November 29, 2006 at 2:18 pm
Hi ,
Can somebody help me on this?
Consider the following fragment of C# code:
string[] s = new string[]{"donald", "Adrian", "Douglas", "adam"};
Array.Sort(s);
for (int i = 0; i < s.Length; i++)
Console.WriteLine(s);
What will be the output here?
November 29, 2006 at 2:35 pm
just create a c# project and paste the code; no need to ask the question here.
if it's not obvious, it's going to sort the array and print them line by line: adam/Adrian/donald/Douglas
results form c#:
'DefaultDomain': Loaded 'c:\winnt\microsoft.net\framework\v1.1.4322\mscorlib.dll', No symbols loaded.
'WindowsApplication1': Loaded 'C:\Documents and Settings\lizaguirre\Desktop\ExcelExport\WindowsApplication1\WindowsApplication1\bin\Debug\WindowsApplication1.exe', Symbols loaded.
'WindowsApplication1.exe': Loaded 'c:\winnt\assembly\gac\system.windows.forms\1.0.5000.0__b77a5c561934e089\system.windows.forms.dll', No symbols loaded.
'WindowsApplication1.exe': Loaded 'c:\winnt\assembly\gac\system\1.0.5000.0__b77a5c561934e089\system.dll', No symbols loaded.
'WindowsApplication1.exe': Loaded 'c:\winnt\assembly\gac\system.drawing\1.0.5000.0__b03f5f7f11d50a3a\system.drawing.dll', No symbols loaded.
adam
Adrian
donald
Douglas
Lowell
November 29, 2006 at 2:36 pm
Thanks
Viewing 3 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply