Click here to Skip to main content
15,890,123 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to Install WindowsService using dos prompt Pin
Colin Angus Mackay15-May-06 2:40
Colin Angus Mackay15-May-06 2:40 
AnswerRe: How to Install WindowsService using dos prompt Pin
Eric Dahlvang15-May-06 4:21
Eric Dahlvang15-May-06 4:21 
QuestionDelegates and inheritance Pin
BadKarma15-May-06 1:58
BadKarma15-May-06 1:58 
AnswerRe: Delegates and inheritance Pin
Robert Rohde15-May-06 2:15
Robert Rohde15-May-06 2:15 
GeneralRe: Delegates and inheritance Pin
BadKarma15-May-06 2:40
BadKarma15-May-06 2:40 
QuestionDataGrid.KeyDown does not work. Pin
Alex3315-May-06 1:26
Alex3315-May-06 1:26 
Questionserial communication problem ? C# ??? Pin
cmpeng3415-May-06 1:13
cmpeng3415-May-06 1:13 
AnswerRe: serial communication problem ? C# ??? Pin
Judah Gabriel Himango15-May-06 6:17
sponsorJudah Gabriel Himango15-May-06 6:17 
First, why are you doing this?

Mehmet Fatih Akbulut wrote:
if (Convert.ToInt32(sp.BytesToRead.ToString()) > 0)


All you're doing there is: converting an integer to a string, then parsing that string back into an integer. D'Oh! | :doh: That is useless, there is no need to convert to a string. Just use

if(sp.BytesToRead > 0)
{
   ...
}


Second, what error are you getting? Did you call sp.Open() before trying to read the data?

Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Islamic Domination: Coming to a Jewish state near you!
The apostle Paul, modernly speaking: Epistles of Paul

Judah Himango


QuestionHOWTO,Printer device context in C# Pin
RezaAsAdi15-May-06 0:09
RezaAsAdi15-May-06 0:09 
Questiontextbox enter key event Pin
Deepak Dhongde15-May-06 0:05
Deepak Dhongde15-May-06 0:05 
AnswerRe: textbox enter key event Pin
microsoc15-May-06 0:25
microsoc15-May-06 0:25 
AnswerRe: textbox enter key event Pin
RezaAsAdi15-May-06 0:28
RezaAsAdi15-May-06 0:28 
QuestionResizing Array (a question about TextBox) Pin
Cristoff14-May-06 23:54
Cristoff14-May-06 23:54 
AnswerRe: Resizing Array (a question about TextBox) Pin
lmoelleb15-May-06 0:21
lmoelleb15-May-06 0:21 
AnswerRe: Resizing Array (a question about TextBox) Pin
J4amieC15-May-06 0:25
J4amieC15-May-06 0:25 
AnswerRe: Resizing Array (a question about TextBox) Pin
Judah Gabriel Himango15-May-06 6:20
sponsorJudah Gabriel Himango15-May-06 6:20 
QuestionWhich is the best source code wizard ? Pin
Tintin9214-May-06 23:50
Tintin9214-May-06 23:50 
AnswerRe: Which is the best source code wizard ? Pin
Christian Graus14-May-06 23:56
protectorChristian Graus14-May-06 23:56 
Questionusing namespaces Pin
Brendan Vogt14-May-06 23:31
Brendan Vogt14-May-06 23:31 
AnswerRe: using namespaces Pin
Christian Graus14-May-06 23:59
protectorChristian Graus14-May-06 23:59 
AnswerRe: using namespaces Pin
Colin Angus Mackay15-May-06 0:28
Colin Angus Mackay15-May-06 0:28 
QuestionWhen to use constructors Pin
Brendan Vogt14-May-06 23:27
Brendan Vogt14-May-06 23:27 
AnswerRe: When to use constructors Pin
lmoelleb15-May-06 0:23
lmoelleb15-May-06 0:23 
AnswerRe: When to use constructors Pin
Guffa15-May-06 1:14
Guffa15-May-06 1:14 
Questionsteganalysis algorithm Pin
nailahazem14-May-06 23:19
nailahazem14-May-06 23:19 

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.