Click here to Skip to main content
15,893,663 members
Home / Discussions / C#
   

C#

 
AnswerRe: Int to string Pin
Josh Smith2-May-06 1:43
Josh Smith2-May-06 1:43 
GeneralRe: Int to string Pin
Rmokkenstorm2-May-06 2:43
Rmokkenstorm2-May-06 2:43 
GeneralRe: Int to string Pin
Josh Smith2-May-06 4:21
Josh Smith2-May-06 4:21 
GeneralRe: Int to string Pin
Rmokkenstorm2-May-06 4:34
Rmokkenstorm2-May-06 4:34 
Questionassigning Values to a resized string Array Pin
abhinish1-May-06 20:50
abhinish1-May-06 20:50 
AnswerRe: assigning Values to a resized string Array Pin
akyriako781-May-06 21:01
akyriako781-May-06 21:01 
Questiongraphics Pin
cshivaprasad1-May-06 20:42
cshivaprasad1-May-06 20:42 
AnswerRe: graphics Pin
CWIZO1-May-06 21:14
CWIZO1-May-06 21:14 
GeneralRe: graphics Pin
cshivaprasad1-May-06 21:19
cshivaprasad1-May-06 21:19 
GeneralRe: graphics Pin
CWIZO1-May-06 21:23
CWIZO1-May-06 21:23 
GeneralRe: graphics Pin
cshivaprasad1-May-06 21:32
cshivaprasad1-May-06 21:32 
GeneralRe: graphics Pin
CWIZO1-May-06 21:35
CWIZO1-May-06 21:35 
GeneralRe: graphics Pin
cshivaprasad1-May-06 23:41
cshivaprasad1-May-06 23:41 
GeneralRe: graphics Pin
CWIZO1-May-06 23:45
CWIZO1-May-06 23:45 
GeneralRe: graphics Pin
cshivaprasad2-May-06 0:08
cshivaprasad2-May-06 0:08 
QuestionDerived CollectionBase Class overwriting previous entries. Pin
Steven_Henley1-May-06 20:24
Steven_Henley1-May-06 20:24 
QuestionWebBrowser / HtmlElement Class Help Pin
joetoday1-May-06 19:32
joetoday1-May-06 19:32 
AnswerRe: WebBrowser / HtmlElement Class Help Pin
leppie1-May-06 20:25
leppie1-May-06 20:25 
GeneralRe: WebBrowser / HtmlElement Class Help Pin
joetoday2-May-06 11:35
joetoday2-May-06 11:35 
Questionreading a file in C# Pin
leanhsang1-May-06 17:36
leanhsang1-May-06 17:36 
AnswerRe: reading a file in C# Pin
CWIZO1-May-06 21:23
CWIZO1-May-06 21:23 
AnswerRe: reading a file in C# Pin
stancrm1-May-06 23:21
stancrm1-May-06 23:21 
using System;
using System.IO;

namespace MyApplication
{
	class Class1
	{
		[STAThread]
		static void Main(string[] args)
		{
			if(File.Exists("output.txt"))
			{
				File.Delete("output.txt");
			}

			StreamReader streamReader = new StreamReader("input.txt");
			StreamWriter streamWriter = new StreamWriter("output.txt");

			while(true)
			{
				try
				{
					string[] texts = streamReader.ReadLine().Split(' ');
					int[] numbers = new int[texts.Length];

					for(int i = 0; i < texts.Length; i++)
					{
						numbers[i] = Int32.Parse(texts[i]);
					}

					Array.Sort(numbers);

					string newString = "";
					for(int i = 0; i < numbers.Length; i++)
					{
						newString += numbers[i].ToString();

						if(i != numbers.Length - 1)
						{
							newString += " ";
						}
					}

					streamWriter.WriteLine(newString);
				}
				catch
				{
					break;
				}
			}

			streamReader.Close();
			streamWriter.Close();
		}
	}
}

QuestionDocument Properties Pin
smarttom991-May-06 17:16
smarttom991-May-06 17:16 
QuestionRecommendation Pin
John L. DeVito1-May-06 15:05
professionalJohn L. DeVito1-May-06 15:05 
AnswerRe: Recommendation Pin
Michael A. Barnhart1-May-06 15:17
Michael A. Barnhart1-May-06 15:17 

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.