Click here to Skip to main content
15,893,486 members
Home / Discussions / C#
   

C#

 
QuestionTime Zone map Pin
Dr. Kelwin16-Jul-08 12:39
Dr. Kelwin16-Jul-08 12:39 
QuestionIs it possible to add import dll during runtime? Pin
pnpfriend16-Jul-08 10:29
pnpfriend16-Jul-08 10:29 
AnswerRe: Is it possible to add import dll during runtime? Pin
Luc Pattyn16-Jul-08 10:58
sitebuilderLuc Pattyn16-Jul-08 10:58 
AnswerRe: Is it possible to add import dll during runtime? Pin
dan!sh 16-Jul-08 19:04
professional dan!sh 16-Jul-08 19:04 
AnswerRe: Is it possible to add import dll during runtime? Pin
PIEBALDconsult17-Jul-08 17:28
mvePIEBALDconsult17-Jul-08 17:28 
QuestionRules for command line parsing Pin
Alan N16-Jul-08 9:40
Alan N16-Jul-08 9:40 
AnswerRe: Rules for command line parsing Pin
Luc Pattyn16-Jul-08 10:11
sitebuilderLuc Pattyn16-Jul-08 10:11 
GeneralRe: Rules for command line parsing Pin
Alan N17-Jul-08 6:40
Alan N17-Jul-08 6:40 
Hi Luc,
Thanks for the response, however I've not sure you understood what I
was getting at.

You are absolutely correct about escape sequences, but surely this
behaviour only applies to literals defined within code, i.e. those that
will be parsed by the compiler. I was referring to quoted strings
entered on the command line and parsed into the args array by the C#
startup routines. Here the \ acts as an escape specifically for the
double quote character. It is not a general escape as, for example, I
do not have to write \\DataFiles\\file1.txt to get \DataFiles\file1.txt
into the args array.

As I was writing this I realised that the startup routine that does the
parsing for C# will be the Environment.GetCommandLineArgs method and the
online help for that does at least document the behaviour.

and I quote...
If a double quotation mark follows two or an even number of
backslashes, each proceeding backslash pair is replaced with one
backslash and the double quotation mark is removed. If a double quotation
mark follows an odd number of backslashes, including just one, each
preceding pair is replaced with one backslash and the remaining backslash
is removed; however, in this case the double quotation mark is not
removed.


A bit more research on this odd behaviour has revealed that it is present
in the win32 function CommandLineToArgvW. It is a pity that Microsoft
didn't choose to implement something a little more logical in the
Framework library.


References

http://msdn.microsoft.com/en-us/library/system.environment.getcommandlineargs.aspx[^]
http://msdn.microsoft.com/en-us/library/bb776391(VS.85).aspx[^]
http://weblogs.asp.net/jgalloway/archive/2006/09/13/Command-Line-Confusion.aspx[^]

Alan.
GeneralRe: Rules for command line parsing Pin
Luc Pattyn17-Jul-08 7:28
sitebuilderLuc Pattyn17-Jul-08 7:28 
Questionbuilding a program to find words in a list of letters Pin
davidallenmorse16-Jul-08 8:04
davidallenmorse16-Jul-08 8:04 
AnswerRe: building a program to find words in a list of letters Pin
Paul Conrad16-Jul-08 9:37
professionalPaul Conrad16-Jul-08 9:37 
GeneralRe: building a program to find words in a list of letters Pin
nelsonpaixao16-Jul-08 12:36
nelsonpaixao16-Jul-08 12:36 
GeneralRe: building a program to find words in a list of letters Pin
davidallenmorse16-Jul-08 15:42
davidallenmorse16-Jul-08 15:42 
GeneralRe: building a program to find words in a list of letters Pin
nelsonpaixao17-Jul-08 13:08
nelsonpaixao17-Jul-08 13:08 
QuestionJava networking Code - conversion to C# Pin
DwR16-Jul-08 7:50
DwR16-Jul-08 7:50 
AnswerRe: Java networking Code - conversion to C# Pin
led mike16-Jul-08 11:04
led mike16-Jul-08 11:04 
GeneralRe: Java networking Code - conversion to C# Pin
DwR16-Jul-08 12:59
DwR16-Jul-08 12:59 
GeneralRe: Java networking Code - conversion to C# Pin
led mike17-Jul-08 7:07
led mike17-Jul-08 7:07 
AnswerRe: Java networking Code - conversion to C# Pin
Judah Gabriel Himango16-Jul-08 11:15
sponsorJudah Gabriel Himango16-Jul-08 11:15 
QuestionData Synchronization and Retrieval Pin
CodingYoshi16-Jul-08 5:41
CodingYoshi16-Jul-08 5:41 
AnswerRe: Data Synchronization and Retrieval Pin
nelsonpaixao17-Jul-08 14:17
nelsonpaixao17-Jul-08 14:17 
GeneralRe: Data Synchronization and Retrieval Pin
CodingYoshi19-Jul-08 8:47
CodingYoshi19-Jul-08 8:47 
QuestionPostMessage # How to pass Message back to Caller EXE?? Pin
ImNAM16-Jul-08 5:19
ImNAM16-Jul-08 5:19 
AnswerRe: PostMessage # How to pass Message back to Caller EXE?? Pin
ImNAM16-Jul-08 7:14
ImNAM16-Jul-08 7:14 
QuestionCollections Advice Please? Pin
itlee16-Jul-08 4:34
itlee16-Jul-08 4:34 

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.