Click here to Skip to main content
15,891,473 members
Home / Discussions / C#
   

C#

 
GeneralRe: Is this forum useful any more? Pin
Judah Gabriel Himango16-Aug-07 19:05
sponsorJudah Gabriel Himango16-Aug-07 19:05 
GeneralRe: Is this forum useful any more? Pin
jith - iii16-Aug-07 19:21
jith - iii16-Aug-07 19:21 
QuestionTreeView does not show selected node! Pin
Mark F.16-Aug-07 13:17
Mark F.16-Aug-07 13:17 
AnswerRe: TreeView does not show selected node! Pin
Mark Churchill16-Aug-07 21:16
Mark Churchill16-Aug-07 21:16 
GeneralRe: TreeView does not show selected node! Pin
Mark F.19-Aug-07 7:28
Mark F.19-Aug-07 7:28 
GeneralRe: TreeView does not show selected node! Pin
Mark Churchill19-Aug-07 15:03
Mark Churchill19-Aug-07 15:03 
GeneralRe: TreeView does not show selected node! Pin
Mark F.20-Aug-07 3:45
Mark F.20-Aug-07 3:45 
QuestionC # Constructor question Pin
radshaykho16-Aug-07 13:15
radshaykho16-Aug-07 13:15 
Hi,

Would anyone explain the meaning of the yellow highlighted code?
I am specifically not sure on what it means as a declaration.

// Constructor that defaults to case-insensitive switches and
// defaults to "/" and "-" as the only valid switch characters
protected ArgumentParser(String[] switchSymbols) : this(switchSymbols, false, new string[] { "/", "-" })
{
}

// Constructor that defaults to "/" and "-" as the only valid switch characters
protected ArgumentParser(String[] switchSymbols, Boolean caseSensitiveSwitches)
: this(switchSymbols, caseSensitiveSwitches, new string[] { "/", "-" })



And how would you rewrite it in a simplified way (Easy to read and understand)

Thank you.
Rad

public abstract class ArgumentParser
{
private String[] switchChars; // For example: "/", "-"

private String[] switchSymbols; // Switch character(s)

private Boolean caseSensitiveSwitches; // Are switches case-sensitive?

// Domain of results when processing a command-line argument switch
protected enum SwitchStatus { NoError, Error, ShowUsage };

// Constructor that defaults to case-insensitive switches and
// defaults to "/" and "-" as the only valid switch characters
protected ArgumentParser(String[] switchSymbols) : this(switchSymbols, false, new string[] { "/", "-" })
{
}

// Constructor that defaults to "/" and "-" as the only valid switch characters
protected ArgumentParser(String[] switchSymbols, Boolean caseSensitiveSwitches)
: this(switchSymbols, caseSensitiveSwitches, new string[] { "/", "-" })
{
}

// Constructor with no defaults
protected ArgumentParser(String[] switchSymbols, Boolean caseSensitiveSwitches, String[] switchChars)
{
this.switchSymbols = switchSymbols;
this.caseSensitiveSwitches = caseSensitiveSwitches;
this.switchChars = switchChars;
}



Thanks,
Rad

AnswerRe: C # Constructor question Pin
Colin Angus Mackay16-Aug-07 13:47
Colin Angus Mackay16-Aug-07 13:47 
GeneralRe: C # Constructor question Pin
Paul Conrad16-Aug-07 15:39
professionalPaul Conrad16-Aug-07 15:39 
AnswerRe: C # Constructor question Pin
Luc Pattyn16-Aug-07 13:50
sitebuilderLuc Pattyn16-Aug-07 13:50 
AnswerRe: C # Constructor question Pin
Scott Dorman16-Aug-07 13:52
professionalScott Dorman16-Aug-07 13:52 
Questionbyte[] file to PDF and then send in an email as atachment Pin
mvadibb16-Aug-07 12:12
mvadibb16-Aug-07 12:12 
AnswerRe: byte[] file to PDF and then send in an email as atachment Pin
Guffa16-Aug-07 14:48
Guffa16-Aug-07 14:48 
AnswerRe: byte[] file to PDF and then send in an email as atachment Pin
User 167325216-Aug-07 14:49
User 167325216-Aug-07 14:49 
GeneralRe: byte[] file to PDF and then send in an email as atachment Pin
mvadibb17-Aug-07 5:37
mvadibb17-Aug-07 5:37 
Questionc# - handling events for forms Pin
jon-8016-Aug-07 11:16
professionaljon-8016-Aug-07 11:16 
AnswerRe: c# - handling events for forms Pin
Luc Pattyn16-Aug-07 11:18
sitebuilderLuc Pattyn16-Aug-07 11:18 
GeneralRe: c# - handling events for forms Pin
jon-8016-Aug-07 11:34
professionaljon-8016-Aug-07 11:34 
GeneralRe: c# - handling events for forms Pin
Luc Pattyn16-Aug-07 11:50
sitebuilderLuc Pattyn16-Aug-07 11:50 
AnswerRe: c# - handling events for forms Pin
Christian Graus16-Aug-07 11:41
protectorChristian Graus16-Aug-07 11:41 
Questioncreating a webcam driver Pin
moroman16-Aug-07 10:59
moroman16-Aug-07 10:59 
AnswerRe: creating a webcam driver Pin
Luc Pattyn16-Aug-07 11:22
sitebuilderLuc Pattyn16-Aug-07 11:22 
GeneralRe: creating a webcam driver Pin
moroman18-Aug-07 3:42
moroman18-Aug-07 3:42 
QuestionCommunications cable connection between two computers Pin
KeithWT16-Aug-07 9:40
KeithWT16-Aug-07 9:40 

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.