Click here to Skip to main content
15,892,298 members
Home / Discussions / C#
   

C#

 
GeneralRe: getting MX servers for mail validation Pin
Heath Stewart18-Feb-04 11:11
protectorHeath Stewart18-Feb-04 11:11 
GeneralStrange remoting issue Pin
lustuyck18-Feb-04 9:40
lustuyck18-Feb-04 9:40 
GeneralRe: Strange remoting issue Pin
Heath Stewart19-Feb-04 3:34
protectorHeath Stewart19-Feb-04 3:34 
GeneralRe: Strange remoting issue Pin
lustuyck19-Feb-04 3:49
lustuyck19-Feb-04 3:49 
GeneralRe: Strange remoting issue Pin
Heath Stewart19-Feb-04 3:52
protectorHeath Stewart19-Feb-04 3:52 
GeneralRe: Strange remoting issue Pin
lustuyck19-Feb-04 3:59
lustuyck19-Feb-04 3:59 
Generalmultiple choice using if else Pin
notsosharp18-Feb-04 8:35
notsosharp18-Feb-04 8:35 
GeneralRe: multiple choice using if else Pin
Werdna18-Feb-04 9:45
Werdna18-Feb-04 9:45 
Here is a simple one.
(doesn't do any error checking)
<br />
class Question<br />
{<br />
	string name;<br />
	ArrayList choices;<br />
	<br />
	public Question(string name)<br />
	{<br />
		choices = new ArrayList();<br />
	}<br />
	<br />
	public string Name<br />
	{<br />
		get { return name; }<br />
	}<br />
	<br />
	pubic ArrayList Choices<br />
	{<br />
		get { return choices; }<br />
	}<br />
}<br />
<br />
class Quiz<br />
{<br />
	static void Main() <br />
	{<br />
		ArrayList questions = new ArrayList();<br />
		Question q = new Question("What is your age?");<br />
		q.Choices.Add("1-15");<br />
		q.Choices.Add("16-50");<br />
		q.Choices.Add("51-100");<br />
		questions.Add(q);<br />
		<br />
		q = new Question("What is your sex?");<br />
		q.Choices.Add("Male");<br />
		q.Choices.Add("Female");<br />
		<br />
		foreach (Question qq in questions)<br />
		{	<br />
			Console.WriteLine(qq.Name);<br />
			int pos=1;<br />
			foreach (string choice in qq.Choices)<br />
			{<br />
				Console.WriteLine(pos.ToString() + ":" + choice);<br />
				pos++;<br />
			}<br />
			<br />
			string answer = Console.ReadLine();<br />
			int answerNum = Int32.Parse(answer);<br />
			<br />
			Console.WriteLine("Your answer is: " + (string)qq.Choices[answerNum]);<br />
			<br />
		}<br />
	}<br />
}<br />

GeneralRe: multiple choice using if else Pin
LongRange.Shooter24-Feb-04 7:00
LongRange.Shooter24-Feb-04 7:00 
GeneralMultiple entrys in zip, memory not being released ! Pin
Daniel Negron18-Feb-04 8:04
Daniel Negron18-Feb-04 8:04 
GeneralRe: Multiple entrys in zip, memory not being released ! Pin
Daniel Negron18-Feb-04 11:12
Daniel Negron18-Feb-04 11:12 
GeneralRe: Multiple entrys in zip, memory not being released ! Pin
Heath Stewart19-Feb-04 3:12
protectorHeath Stewart19-Feb-04 3:12 
GeneralSaving JPG File Pin
Mr_Mike18-Feb-04 7:49
Mr_Mike18-Feb-04 7:49 
GeneralRe: Saving JPG File Pin
Mazdak18-Feb-04 7:56
Mazdak18-Feb-04 7:56 
GeneralCheckBoxItem DataBinding problems Pin
ParrotBoy18-Feb-04 7:04
ParrotBoy18-Feb-04 7:04 
GeneralRe: CheckBoxItem DataBinding problems Pin
Heath Stewart18-Feb-04 11:18
protectorHeath Stewart18-Feb-04 11:18 
GeneralHiding a Fullscreen App (game) Pin
Kir Birger18-Feb-04 6:27
Kir Birger18-Feb-04 6:27 
GeneralRe: Hiding a Fullscreen App (game) Pin
Heath Stewart18-Feb-04 10:45
protectorHeath Stewart18-Feb-04 10:45 
GeneralAutomation Pin
yyf18-Feb-04 5:46
yyf18-Feb-04 5:46 
GeneralRe: Automation Pin
Mazdak18-Feb-04 6:03
Mazdak18-Feb-04 6:03 
GeneralRe: Automation Pin
Heath Stewart18-Feb-04 10:30
protectorHeath Stewart18-Feb-04 10:30 
GeneralRe: Automation Pin
yyf19-Feb-04 3:13
yyf19-Feb-04 3:13 
GeneralRe: Automation Pin
Heath Stewart19-Feb-04 3:20
protectorHeath Stewart19-Feb-04 3:20 
GeneralRe: Automation Pin
yyf19-Feb-04 8:13
yyf19-Feb-04 8:13 
GeneralRe: Automation Pin
Heath Stewart19-Feb-04 8:44
protectorHeath Stewart19-Feb-04 8:44 

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.