string.Fomat() is may favorite method in c#

by ssi 18. October 2013 16:54
  static void Main(string[] args)
        {
            Console.WriteLine("string.Fomat() is may favorite method in c#");
            string sOuput = string.Format("Whatever you put after the comma converts to a string");
 
            Console.WriteLine(sOuput);
            object[] array = new object[8];
            array[0] = 1000;
            array[1] = DateTime.Parse("1/1/2013");
            array[2] = "Cadence bank";
            array[3] = DateTime.Now;
            array[4] = 'A';
            array[5] = null;
            array[6] = true;
            array[7] = "ross";
           for (int i = 0; i <= array.GetUpperBound(0); i++)
			{
                 sOuput = string.Format("{0}", array[i]);
                 Console.WriteLine(sOuput);
			}  
            Console.ReadLine();
 
        }

Tags:

CSharp

Add comment

biuquote
  • Comment
  • Preview
Loading

Calendar

<<  December 2025  >>
MoTuWeThFrSaSu
24252627282930
1234567
891011121314
15161718192021
22232425262728
2930311234

View posts in large calendar

RecentComments

None

Development Team @ Shelbysys

We develop custom database applications for our clients. Our development tool of choice is MS Visual Studio. 

Quotations

"Fill the unforgiving minute with sixty seconds worth of distance run."
Rudyard Kipling