Help C# to .NET !
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
10 posts
Page 1 of 1
Don't know where should i put this but any way, i am trying to convert chat application C# code into VB.NET !
I can't get this ... :(
Online code didn't make it usable :/
I can't get this ... :(
Code: Select all
If anyone knows where to put this or if knows how to convert ? Dim srReceiver As StreamReader
srReceiver = new StreamReader(tcpServer.GetStream());
Online code didn't make it usable :/
srReceiver = new StreamReader(tcpServer.GetStream()); To vb =
Dim srReceiver as SteamReader = new StreamReader(args) , with other words , args should be "tcpServer.GetStream()"
Dim srReceiver as SteamReader = new StreamReader(args) , with other words , args should be "tcpServer.GetStream()"
Code: Select all
= srReceiver = new StreamReader(tcpServer.GetStream());
Code: Select all
Tell me if it works...Dim srReceiver as StreamReader = tcpServer.Getstream()
Last edited by Codex on Sat Jan 15, 2011 5:46 pm, edited 1 time in total.
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
Codex, if that should work, you have to remove the 'New' specifier
And what is the type of 'tcpServer' is it a tcpClient or tcpListener? If it is a client you can use this:
And what is the type of 'tcpServer' is it a tcpClient or tcpListener? If it is a client you can use this:
Code: Select all
Dim s As Net.Sockets.NetworkStream = tcpServer.GetStream
Dim baseByte() As Byte
s.Read(baseByte, 0, s.Length)
Dim m As IO.Stream = New IO.MemoryStream(baseByte)
Dim srReceiver As New IO.StreamReader(m)
LMAOSHMSFOAIDMT
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!
![Image]()
![Image]()
Laughing my a** of so hard my sombrero fell off and I dropped my taco lmao;
Over 30 projects with source code!
Please give reputation to helpful members!

M1z23R wrote:Dim tcpServer = New TcpClient()If that solved it then lock your topic, if possible.
We shall let the revolution begin.. the revolution for freedom, freedom against censorship. We shall fight in the fields and in the streets, we shall fight in the hills; we shall never surrender
MrAksel wrote:Codex, if that should work, you have to remove the 'New' specifier"This stream does not support seek operations."
And what is the type of 'tcpServer' is it a tcpClient or tcpListener? If it is a client you can use this:Code: Select allDim s As Net.Sockets.NetworkStream = tcpServer.GetStream Dim baseByte() As Byte s.Read(baseByte, 0, s.Length) Dim m As IO.Stream = New IO.MemoryStream(baseByte) Dim srReceiver As New IO.StreamReader(m)
:( Still nothing :/
Still didn't solve it :(
THANKS A LOT ! I got it 
I used half of your code Codex

Tnx

I used half of your code Codex
Code: Select all
It worked perfectly ! Dim s As Net.Sockets.NetworkStream = tcpServer.GetStream
srReceiver = New StreamReader(s)

Tnx
10 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023