Click here to Skip to main content
15,914,222 members
Home / Discussions / C#
   

C#

 
GeneralSmall XML/C# problem... Pin
eggie53-May-03 20:12
eggie53-May-03 20:12 
GeneralRe: Small XML/C# problem... Pin
Torsten Mauz3-May-03 22:41
Torsten Mauz3-May-03 22:41 
GeneralRe: Small XML/C# problem... Pin
eggie54-May-03 8:46
eggie54-May-03 8:46 
QuestionWhat does a Stream reader/writer return? Pin
Snowjim3-May-03 12:59
Snowjim3-May-03 12:59 
AnswerRe: What does a Stream reader/writer return? Pin
leppie3-May-03 23:47
leppie3-May-03 23:47 
AnswerRe: What does a Stream reader/writer return? Pin
Stephane Rodriguez.4-May-03 0:17
Stephane Rodriguez.4-May-03 0:17 
QuestionCustomizable 3rd party Dialog controls? Pin
Markri2-May-03 13:19
Markri2-May-03 13:19 
AnswerRe: Customizable 3rd party Dialog controls? Pin
Stephane Rodriguez.4-May-03 0:46
Stephane Rodriguez.4-May-03 0:46 
QuestionOutlook like managed ListView Control ? Pin
Chris Richner2-May-03 6:25
Chris Richner2-May-03 6:25 
AnswerRe: Outlook like managed ListView Control ? Pin
J. Dunlap2-May-03 7:14
J. Dunlap2-May-03 7:14 
QuestionHow to show derived controls on a form? Pin
Alvaro Mendez2-May-03 6:13
Alvaro Mendez2-May-03 6:13 
AnswerRe: How to show derived controls on a form? Pin
apferreira3-May-03 23:16
apferreira3-May-03 23:16 
GeneralSetting ProductName and other version info Pin
S S Basra2-May-03 4:43
S S Basra2-May-03 4:43 
GeneralRe: Setting ProductName and other version info Pin
Burt Harris4-May-03 16:21
Burt Harris4-May-03 16:21 
Questionany idea what this sudo code would do??? Pin
t_elliff2-May-03 4:15
t_elliff2-May-03 4:15 
AnswerRe: any idea what this sudo code would do??? Pin
leppie2-May-03 7:03
leppie2-May-03 7:03 
AnswerRe: any idea what this sudo code would do??? Pin
Jim Stewart2-May-03 8:47
Jim Stewart2-May-03 8:47 
C#
public void DoesSomethingIKnowNotWhat()
{
	//String x;
	string x;
	//Boolean f;
	bool f;
	//integer a, z,g;
	int a, z, g;

	//x = readinput
	x = Console.ReadLine ();
	//g = length of x
	g = x.Length;
	//z = g minus one;
	z = g - 1;

	//a = zero
	a = 0;

	//if g = 1 then f = 1
	if (g == 1)
	{
		f = 1;
	}
		//else 
	else 
	{
		//f = 1;
		f = 1;
	}

	//while (f=1 and a less than z)
	while (f = 1 && a < z)
	{

		//while character at a of x is one of [whitespace,comma,semicolon, or full stop] 
		while (x.Substring (a, 1) == " " ||
			x.Substring (a, 1) == ";" ||
			x.Substring (a, 1) == ".")
		{
			//a++;
			a++;
		}
						
		//while character at z of x is one of [whitespace,comma,semicolon, or full stop]
		while (x.Substring (z, 1) == " " ||
			x.Substring (z, 1) == ";" ||
			x.Substring (z, 1) == ".")
		{
			//z--;
			z--;
		}
			
	
		//if the toUpperCase of character at a of x is identical to
		if (x.Substring (a, 1).ToUpper () ==	
			//the toUpperCase of character at z of x
			x.Substring (z, 1).ToUpper ())
		{
			//then a++ and z--;
			a++;
			z--;
		}			
		//else f=0;
		else
		{
			f = 0;
		}
	} // I believe this is where the while should end
	
	//if f=0 then print out appropriate message
	if (f == 0)
	{
		Console.WriteLine ("Appropriate message");
	}
		//else print out other appropriate message
	else
	{
		Console.WriteLine ("Other appropriate message");
	}
}


α.γεεκ

Fortune passes everywhere.
Duke Leto Atreides


GeneralNices way ... Stream! Pin
Daniel Strigl2-May-03 4:13
Daniel Strigl2-May-03 4:13 
GeneralRe: Nices way ... Stream! Pin
Nathan Blomquist2-May-03 9:23
Nathan Blomquist2-May-03 9:23 
GeneralRe: Nices way ... Stream! Pin
Daniel Strigl2-May-03 20:51
Daniel Strigl2-May-03 20:51 
GeneralPlay music in C# Pin
Stoffe2-May-03 3:25
Stoffe2-May-03 3:25 
GeneralRe: Play music in C# Pin
Tim Fischbach5-May-03 4:42
Tim Fischbach5-May-03 4:42 
GeneralComboGrid Problem: How to get ComboBoxEvents before the DataGrid Pin
STW2-May-03 3:11
STW2-May-03 3:11 
QuestionHow to get KeyDownEvent from a ChildControl before the ParentControl Pin
STW2-May-03 3:10
STW2-May-03 3:10 
GeneralWhere to start... Pin
Steve McLenithan2-May-03 2:28
Steve McLenithan2-May-03 2:28 

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.