Click here to Skip to main content
15,900,378 members
Home / Discussions / C#
   

C#

 
AnswerRe: DataTable Update Access database [modified] Pin
PIEBALDconsult9-Feb-09 17:03
mvePIEBALDconsult9-Feb-09 17:03 
GeneralRe: DataTable Update Access database Pin
Planker10-Feb-09 7:20
Planker10-Feb-09 7:20 
Question.net Remoting with multiple nics on client side Pin
obadran9-Feb-09 16:05
obadran9-Feb-09 16:05 
QuestionUsing a System.Windows.Forms.WebBrowser inside ASP web form Pin
trinm19879-Feb-09 14:51
trinm19879-Feb-09 14:51 
AnswerRe: Using a System.Windows.Forms.WebBrowser inside ASP web form Pin
N a v a n e e t h9-Feb-09 14:55
N a v a n e e t h9-Feb-09 14:55 
GeneralRe: Using a System.Windows.Forms.WebBrowser inside ASP web form Pin
trinm19879-Feb-09 15:08
trinm19879-Feb-09 15:08 
GeneralRe: Using a System.Windows.Forms.WebBrowser inside ASP web form Pin
N a v a n e e t h9-Feb-09 15:15
N a v a n e e t h9-Feb-09 15:15 
GeneralRe: Using a System.Windows.Forms.WebBrowser inside ASP web form Pin
ABitSmart9-Feb-09 17:22
ABitSmart9-Feb-09 17:22 
AnswerRe: Using a System.Windows.Forms.WebBrowser inside ASP web form Pin
PIEBALDconsult9-Feb-09 17:15
mvePIEBALDconsult9-Feb-09 17:15 
QuestionReplacement for VSA Pin
User 127829-Feb-09 14:14
User 127829-Feb-09 14:14 
Questiontokenize string Pin
lawrenceinba9-Feb-09 13:54
lawrenceinba9-Feb-09 13:54 
AnswerRe: tokenize string Pin
PIEBALDconsult9-Feb-09 14:53
mvePIEBALDconsult9-Feb-09 14:53 
GeneralRe: tokenize string Pin
lawrenceinba9-Feb-09 15:19
lawrenceinba9-Feb-09 15:19 
GeneralRe: tokenize string Pin
ABitSmart9-Feb-09 16:13
ABitSmart9-Feb-09 16:13 
AnswerRe: tokenize string Pin
ABitSmart9-Feb-09 15:20
ABitSmart9-Feb-09 15:20 
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 

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.