Thursday, February 12, 2015

Network Programming Interview Questions C#.Net


  1. Which namespaces are used for TCP/IP network socket programming in C#.Net? AnswerSystem.Net and System.Net.Sockets
  2. An object of System.Net.Sockets.TcpListener will be used to listen for incoming connection requests. Answer: True
  3. Once we call the method TcpListener.Start, our TcpListener object starts handling incoming connection requests. Answer: False
  4. Which class is used to represent a callback or delegate method? Answer: AsyncCallback
  5. IAsyncResult.AsyncState contains the original TCPListener object which was passed as parameter to BeginAcceptTCPClient method call. Answer: True

  6. The Windows ____ can stop your code from using network, you better disable it for a while. Answer: Firewall
  7. An object of which class is used to handle client communication? Answer: TcpClient
  8. NetworkStream.BeginRead method will return data in ____ array. Answer: byte
  9. TcpClient.Client represent an object of which type? Answer: Socket
  10. Encoding.ASCII.GetBytes is used to convert text to bytes in order to send it over network. Answer: True
  11. A TCP/IP socket server needs to perform following network operations. Answer: Listen for incoming connections, send data to clients, receive data from clients.
Learn more about Socket and network programming in C# .Net in my Udemy course:
TCP/IP Socket Programming For Coders & Students 





Demo TCP/IP Sockets Read and Write in C#, Free Udemy Course from Naeem Akram on Vimeo.

5 comments:

Feel free to talk back...