Click here to Skip to main content
15,903,632 members
Home / Discussions / C#
   

C#

 
Questionhow to make excel with zero before the number in C# Pin
goldsoft6-Dec-10 19:31
goldsoft6-Dec-10 19:31 
AnswerRe: how to make excel with zero before the number in C# Pin
Mycroft Holmes6-Dec-10 20:49
professionalMycroft Holmes6-Dec-10 20:49 
QuestionSend SMS in asp.net Pin
yesu prakash6-Dec-10 17:50
yesu prakash6-Dec-10 17:50 
AnswerRe: Send SMS in asp.net Pin
keyboard warrior6-Dec-10 17:56
keyboard warrior6-Dec-10 17:56 
AnswerRe: Send SMS in asp.net Pin
Muhammad Mazhar7-Dec-10 3:55
Muhammad Mazhar7-Dec-10 3:55 
AnswerRe: Send SMS in asp.net Pin
Yvan Rodrigues12-Dec-10 14:11
professionalYvan Rodrigues12-Dec-10 14:11 
AnswerRe: Send SMS in asp.net Pin
RaviRanjanKr17-Dec-10 17:53
professionalRaviRanjanKr17-Dec-10 17:53 
QuestionI face a problem on reading the stream (Telnet Client) Pin
Moustafa Safwat6-Dec-10 17:09
Moustafa Safwat6-Dec-10 17:09 
Hi Guys,

Actually, I have been started a Telnet client, but I face a problem on reading the stream.

First, I started my localhost machine Telnet service, and get a tcp connection with it as following.
TcpClient destenationHost = new TcpClient("127.0.0.1", 23); //

Then, I got the streaming to act with it as following:
NetworkStream streamData = destenationHost.GetStream(); //

After that, I Read network stream into a byte buffer.
byte[] bytes = new byte[destenationHost.ReceiveBufferSize]; //

Then, I Read the stream data.
streamData.Read(bytes, 0, (int)destenationHost.ReceiveBufferSize); //

finally, I Return the data received from the host to the console.
Console.WriteLine((Encoding.UTF8.GetString(bytes)); //

I could connect, But I got message like "??%?? ??:??'?? ??".
I tried the Unicode, ASCII, etc, but the result also not satisfied.
I tried also the following code, but it gives me number .
treamReader streamReader = new StreamReader(streamData); //
Console.WriteLine(streamReader.Read()); //
AnswerRe: I face a problem on reading the stream (Telnet Client) Pin
Dave Kreskowiak6-Dec-10 17:55
mveDave Kreskowiak6-Dec-10 17:55 
GeneralRe: I face a problem on reading the stream (Telnet Client) Pin
Moustafa Safwat6-Dec-10 21:57
Moustafa Safwat6-Dec-10 21:57 
GeneralRe: I face a problem on reading the stream (Telnet Client) Pin
PIEBALDconsult7-Dec-10 2:32
mvePIEBALDconsult7-Dec-10 2:32 
GeneralRe: I face a problem on reading the stream (Telnet Client) Pin
Moustafa Safwat7-Dec-10 17:36
Moustafa Safwat7-Dec-10 17:36 
AnswerRe: I face a problem on reading the stream (Telnet Client) Pin
PIEBALDconsult7-Dec-10 2:32
mvePIEBALDconsult7-Dec-10 2:32 
GeneralRe: I face a problem on reading the stream (Telnet Client) Pin
Moustafa Safwat7-Dec-10 17:43
Moustafa Safwat7-Dec-10 17:43 
AnswerRe: I face a problem on reading the stream (Telnet Client) Pin
jschell7-Dec-10 10:16
jschell7-Dec-10 10:16 
GeneralRe: I face a problem on reading the stream (Telnet Client) Pin
Moustafa Safwat7-Dec-10 18:01
Moustafa Safwat7-Dec-10 18:01 
GeneralRe: I face a problem on reading the stream (Telnet Client) Pin
PIEBALDconsult7-Dec-10 18:26
mvePIEBALDconsult7-Dec-10 18:26 
QuestionNeed Help Understanding Error Handling Pin
JDM67636-Dec-10 9:34
JDM67636-Dec-10 9:34 
AnswerRe: Need Help Understanding Error Handling PinPopular
Luc Pattyn6-Dec-10 9:58
sitebuilderLuc Pattyn6-Dec-10 9:58 
GeneralRe: Need Help Understanding Error Handling Pin
JDM67636-Dec-10 10:09
JDM67636-Dec-10 10:09 
GeneralRe: Need Help Understanding Error Handling Pin
DaveyM698-Dec-10 2:48
professionalDaveyM698-Dec-10 2:48 
GeneralRe: Need Help Understanding Error Handling Pin
Luc Pattyn8-Dec-10 4:35
sitebuilderLuc Pattyn8-Dec-10 4:35 
AnswerRe: Need Help Understanding Error Handling Pin
PIEBALDconsult6-Dec-10 12:21
mvePIEBALDconsult6-Dec-10 12:21 
Questionhow to convert dataset to excell ? Pin
Gali19786-Dec-10 9:04
Gali19786-Dec-10 9:04 
AnswerRe: how to convert dataset to excell ? Pin
Pawel Gielmuda6-Dec-10 22:50
Pawel Gielmuda6-Dec-10 22:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.