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

C#

 
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 
GeneralRe: Where to start... Pin
Chris Austin3-May-03 17:06
Chris Austin3-May-03 17:06 
GeneralRe: Where to start... Pin
Steve McLenithan3-May-03 17:11
Steve McLenithan3-May-03 17:11 
GeneralRemoting Pin
Jon Newman2-May-03 1:53
Jon Newman2-May-03 1:53 
GeneralOpen an "About" window.... Pin
eggie51-May-03 18:30
eggie51-May-03 18:30 
GeneralRe: Open an "About" window.... Pin
draco_iii1-May-03 23:36
draco_iii1-May-03 23:36 
GeneralRe: Open an "About" window.... Pin
eggie52-May-03 12:25
eggie52-May-03 12:25 
GeneralGet access to main form from child form Pin
paulb1-May-03 14:04
paulb1-May-03 14:04 
GeneralRe: Get access to main form from child form Pin
Nathan Blomquist1-May-03 17:45
Nathan Blomquist1-May-03 17:45 
GeneralComponent Authoring Pin
draco_iii1-May-03 11:15
draco_iii1-May-03 11:15 

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.