Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: tokenize string Pin
lawrenceinba9-Feb-09 15:26
lawrenceinba9-Feb-09 15:26 
QuestionAny one use LibCheck or know of an alternative Pin
pdohara9-Feb-09 12:25
pdohara9-Feb-09 12:25 
AnswerRe: Any one use LibCheck or know of an alternative Pin
lawrenceinba9-Feb-09 14:40
lawrenceinba9-Feb-09 14:40 
GeneralRe: Any one use LibCheck or know of an alternative Pin
pdohara11-Feb-09 8:24
pdohara11-Feb-09 8:24 
AnswerRe: Any one use LibCheck or know of an alternative Pin
pdohara14-Feb-09 9:40
pdohara14-Feb-09 9:40 
Questionpassing arrays to different methods Pin
alwaysthinking9-Feb-09 12:10
alwaysthinking9-Feb-09 12:10 
AnswerRe: passing arrays to different methods Pin
harold aptroot9-Feb-09 12:22
harold aptroot9-Feb-09 12:22 
GeneralRe: passing arrays to different methods Pin
alwaysthinking9-Feb-09 12:42
alwaysthinking9-Feb-09 12:42 
To be perfectly i dont know what i want to do with this... I want to be able to select different grammars depending on the inputs given. All I am looking for is the best way to first determine what structure does a line/lines follow (ABCDE), then parse according to the structure, then set different variables to what is left. What With only adding the following code, not changing original I receive an error message



if (words[0] == "A")
Console.WriteLine("AGRAMMAR");
AGrammar(words, Text);
if (words[0] == "B")
Console.WriteLine("AGRAMMAR");
BGrammar(words, Text);


public void AGrammar(String[] AType, string Text)
{
char[] delimiterCharsA = { '4','5','6'}; //set parse parameters
AType = Text.Split(delimiterCharsA);
Console.WriteLine("Next line should repeat");
Console.Write("123 ");

}


public void BGrammar(String[] BType, string Text)
{
char[] delimiterCharsB = { '1', '2', '3' }; //set parse parameters
BType = Text.Split(delimiterCharsB);
Console.WriteLine("Next line should repeat");
Console.Write("456 ");
}


If the file has "A123456" then the output should be "123 123"
If the file has "B123456" then the output should be "456 456"


But i get the error an object references is required for the non-static field, method, or property
GeneralRe: passing arrays to different methods Pin
harold aptroot9-Feb-09 14:13
harold aptroot9-Feb-09 14:13 
AnswerRe: passing arrays to different methods Pin
Natza Mitzi9-Feb-09 12:41
Natza Mitzi9-Feb-09 12:41 
QuestionWebform and refresh Pin
Saamir9-Feb-09 11:53
Saamir9-Feb-09 11:53 
AnswerRe: Webform and refresh Pin
vaghelabhavesh9-Feb-09 13:53
vaghelabhavesh9-Feb-09 13:53 
AnswerRe: Webform and refresh Pin
EliottA9-Feb-09 14:02
EliottA9-Feb-09 14:02 
Question[Message Deleted] Pin
Terick9-Feb-09 11:48
Terick9-Feb-09 11:48 
AnswerRe: DropDownList selection as QueryInput Pin
vaghelabhavesh9-Feb-09 14:02
vaghelabhavesh9-Feb-09 14:02 
GeneralRe: DropDownList selection as QueryInput Pin
Terick10-Feb-09 4:37
Terick10-Feb-09 4:37 
GeneralRe: DropDownList selection as QueryInput Pin
vaghelabhavesh10-Feb-09 5:41
vaghelabhavesh10-Feb-09 5:41 
QuestionQuick Question Pin
MrMcIntyre9-Feb-09 10:40
MrMcIntyre9-Feb-09 10:40 
AnswerRe: Quick Question Pin
DaveyM699-Feb-09 10:48
professionalDaveyM699-Feb-09 10:48 
GeneralRe: Quick Question Pin
MrMcIntyre9-Feb-09 11:12
MrMcIntyre9-Feb-09 11:12 
GeneralRe: Quick Question Pin
DaveyM699-Feb-09 11:20
professionalDaveyM699-Feb-09 11:20 
GeneralRe: Quick Question Pin
MrMcIntyre9-Feb-09 11:50
MrMcIntyre9-Feb-09 11:50 
GeneralRe: Quick Question Pin
Dave Kreskowiak9-Feb-09 12:09
mveDave Kreskowiak9-Feb-09 12:09 
GeneralRe: Quick Question Pin
MrMcIntyre10-Feb-09 6:07
MrMcIntyre10-Feb-09 6:07 
Questioncalculator application Pin
lenboy109-Feb-09 10:24
lenboy109-Feb-09 10:24 

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.