70-540  Exam

Exam # of questions Description  Update
70-540 134 Microsoft Windows Mobile Application Development... 02/15/2011
[Practice Test]   [Download Study Guide(PDF)]  [Update Exam]

70-540 - Exam Information
  • Description:Microsoft Windows Mobile Application Development
  • Passing Score:0%
  • Practice Test - Number of questions:134 questions
  • Simulation Test - Number of questions:134 questions
  • Simulation Test Duration:120 minutes
  • Has explanations:No

Question of the day

You are creating a Microsoft Windows Mobilebased application. The application connects to a remote server named www.contoso.com on port 80. You need to retrieve data from the remote server by using the TcpClient class. Which code segment should you use?

Answer(s)

  1. Dim tcpClient As New TcpClient()Dim netStream As NetworkStream = tcpClient.GetStream()Dim readBytes() As [Byte] = New Byte(255) {}DonetStream.Read ( readBytes , 0, 0)Loop While netStream.DataAvailabletcpClient.Close()netStream.Close()
  2. Dim tcpClient As New TcpClient("www.conto so.com", 80)Dim netStream As NetworkStream = tcpClient.GetStream()Dim readBytes() As [Byte] = New Byte(255) {}DonetStream.Read ( readBytes , 0, readBytes.Length )Loop While netStream.DataAvailabletcpClient.Clos e()netStream.Close()
  3. Dim tcpCli ent As New TcpClient("www.conto so.com", 80)tcpClient.Connect("www.conto so.com", 80)
  4. netStream As NetworkStream = tcpClient.GetStream()Dim readBytes() As [Byte] = New Byte(255) {}DonetStream.Read ( readBytes , 0, 0)Loop While netStream.DataAvailabletcpClient.Close()netStream.Close()D. Dim tcpClient As New TcpClient()tcpClient.Connect("www.conto so.com", 80)Dim socket As New Socket(AddressFamily.InterNetwork, _SocketType.Stream, ProtocolType.Tcp)Dim netStream As New NetworkStream(socket)Dim readBytes() As [Byte] = New Byte(255) {}DonetStream.Read ( readBytes , 0, readBytes.Length )Loop While netStream.DataAvailabletcpClient.Close()netStream.Close()
Correct Answer

Dim tcpClient As New TcpClient("www.conto so.com", 80)Dim netStream As NetworkStream = tcpClient.GetStream()Dim readBytes() As [Byte] = New Byte(255) {}DonetStream.Read ( readBytes , 0, readBytes.Length )Loop While netStream.DataAvailabletcpClient.Clos e()netStream.Close()