Sunday, August 10

Blogging Tip: Initial Capital

Today I am trying to learn how to post with an initial capital letter. Apparently it does work. Now I feel like I'm really publishing something.

Thanks to Omar Abid's blog: omar-abid

Monday, August 4

C# Code Formatting

Yes! I managed to find a way to format code for my blog.

Thanks to manoli.net

Here is how it turned out:

   1:  /*************************************************
   2:  * This sample illustrates how to use an ArrayList 
   3:  * and a foreach loop.
   4:  * (from the quickstart tutorials)
   5:  **************************************************/
   6:  using System;
   7:  using System.Collections;
   8:   
   9:  class ListSample
  10:  {
  11:      public static void Main(String[] args)
  12:      {
  13:          //create the arraylist and add the items
  14:          ArrayList fruit = new ArrayList();
  15:          fruit.Add("Apple");
  16:          fruit.Add("Pear");
  17:          fruit.Add("Orange");
  18:          fruit.Add("Banana");
  19:   
  20:          //loop through the arraylist elements
  21:          foreach (String item in fruit)
  22:          {
  23:              Console.WriteLine(item);
  24:          }
  25:          
  26:          Console.WriteLine ("\nPress Return to exit.");
  27:          Console.Read();
  28:      }
  29:  }