Click here to Skip to main content
15,929,796 members
Home / Discussions / C#
   

C#

 
AnswerRe: An algorithm Pin
Giorgi Dalakishvili10-May-07 10:17
mentorGiorgi Dalakishvili10-May-07 10:17 
AnswerRe: An algorithm Pin
LongRange.Shooter10-May-07 10:27
LongRange.Shooter10-May-07 10:27 
QuestionWindows Form Table Pin
Anka_Ame10-May-07 8:44
Anka_Ame10-May-07 8:44 
AnswerRe: Windows Form Table Pin
SimulationofSai10-May-07 8:54
SimulationofSai10-May-07 8:54 
AnswerRe: Windows Form Table Pin
Drew McGhie10-May-07 9:53
Drew McGhie10-May-07 9:53 
QuestionReturn a string to a literal Pin
snorkie10-May-07 8:38
professionalsnorkie10-May-07 8:38 
AnswerRe: Return a string to a literal Pin
SimulationofSai10-May-07 8:53
SimulationofSai10-May-07 8:53 
QuestionRe: Return a string to a literal Pin
snorkie10-May-07 10:21
professionalsnorkie10-May-07 10:21 
Maybe I didn't explain myself correctly, but the replace I put in the code did fix the problem.

I'll try again.

If I call the command SendStr("W\r"), it passes a Capital W and carriage Return to the com port. This works as desired as the device attached is expecting this string.

If I set a variable through a text box, I get the value @"W\r" passed literally to the device with no carriage return. So the command looks like SendStr(stringVariable).

Sample Application code: http://www.snorkie.com/codesamples/stringsample.txt

Set your breakpoint at line 105. Press the button and look at the value of the two variables s and s2 by putting your mouse over them or using the watch. You will see that they are different...
s = "W\r"
s2 = @"W\r"

Using the value from s2 won't pass the carriage return I need for my device. Converting s2 using the code s2.Replace(@"\r","\r") does give me the value I need.

So again, I have a solution, but I think there has to be a better one. Does anybody see a better way to do this?

Thanks

Hogan
AnswerRe: Return a string to a literal Pin
Guffa10-May-07 11:57
Guffa10-May-07 11:57 
QuestionClickOnce deploy Pin
alex.almeida10-May-07 8:05
alex.almeida10-May-07 8:05 
AnswerRe: ClickOnce deploy Pin
SimulationofSai10-May-07 9:07
SimulationofSai10-May-07 9:07 
GeneralRe: ClickOnce deploy Pin
Dave Kreskowiak10-May-07 10:35
mveDave Kreskowiak10-May-07 10:35 
GeneralRe: ClickOnce deploy Pin
alex.almeida18-May-07 2:39
alex.almeida18-May-07 2:39 
AnswerRe: ClickOnce deploy Pin
LongRange.Shooter10-May-07 10:32
LongRange.Shooter10-May-07 10:32 
QuestionFresh prospective Pin
Justin Perez10-May-07 6:28
Justin Perez10-May-07 6:28 
AnswerRe: Fresh prospective Pin
Bijesh10-May-07 6:36
Bijesh10-May-07 6:36 
AnswerRe: Fresh prospective Pin
snorkie10-May-07 10:25
professionalsnorkie10-May-07 10:25 
QuestionHypothetical Web data distribution performance issue. Pin
mike montagne10-May-07 5:19
mike montagne10-May-07 5:19 
AnswerRe: Hypothetical Web data distribution performance issue. Pin
Tarakeshwar Reddy10-May-07 5:43
professionalTarakeshwar Reddy10-May-07 5:43 
GeneralRe: Hypothetical Web data distribution performance issue. Pin
mike montagne10-May-07 8:14
mike montagne10-May-07 8:14 
GeneralRe: Hypothetical Web data distribution performance issue. Pin
mike montagne10-May-07 8:50
mike montagne10-May-07 8:50 
GeneralRe: Hypothetical Web data distribution performance issue. Pin
Tarakeshwar Reddy10-May-07 11:12
professionalTarakeshwar Reddy10-May-07 11:12 
GeneralRe: Hypothetical Web data distribution performance issue. Pin
mike montagne10-May-07 15:58
mike montagne10-May-07 15:58 
AnswerRe: Hypothetical Web data distribution performance issue. Pin
Pete O'Hanlon10-May-07 9:40
mvePete O'Hanlon10-May-07 9:40 
GeneralRe: Hypothetical Web data distribution performance issue. Pin
mike montagne10-May-07 10:35
mike montagne10-May-07 10:35 

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.