C#
  Home arrow C# arrow C# Simplified, part 3
ASP Free Forums 
.NET  
ASP  
ASP Code  
ASP.NET  
ASP.NET Code  
BrainDump  
C#  
Code Examples  
Database  
Database Code  
IIS  
Microsoft Access  
MS SQL Server  
Visual Basic.NET  
Windows Scripting  
Windows Security  
XML  
ASP Web Hosting  
ASP.NET Web Hosting 
Mobile Linux 
App Generation ROI 
Windows Web Hosting
 
IBM® developerWorks 
Sun Developer Network 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
C#

C# Simplified, part 3
By: Anand Narayanaswamy
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 2 stars2 stars2 stars2 stars2 stars / 11
    2005-05-17

    Table of Contents:
  • C# Simplified, part 3
  • Displaying numbers in different formats
  • Display date and time in different formats
  • Arrays
  • Using Array.Rank
  • Enumerations

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    C# Simplified, part 3


    (Page 1 of 6 )

    In this article you will learn about a variety of useful functionalities in C#. These include various escape characters; differing formats for numbers, dates, and time; arrays; and enumeration.


    Files associated with this article can be downloaded here.


    C# Simplified covers each and every concept of C# programming language in a concise manner. The articles in this series have been divided into several parts and will provide detailed explanations along with source codes and screenshots. This series has been specifically written for beginners and students with an aim to teach C# in the quickest possible time. Please send your comments to csharpsimplified@gmail.com

    Different Types of Escape Characters in C#

    C# provides a variety of ways to produce beep sounds when an error occurs, create tabs between words, print output with double quotes and much more. These functionalities can be achieved with the help of the built-in escape characters. Listing 3.1 illustrates each of these characters in detail. I have provided the necessary explanations in the form of comments

    Listing 3.1

    using System;

    class Escape

    {

    public static void Main()

    {

    // Prints Welcome with a single beep from your CPU

    Console.WriteLine("Single beep sound heard");

    Console.WriteLine("\aWelcome");

    // Prints elcome after deleting W due to Backspace escape character

    Console.WriteLine("W\belcome");

    // Prints Wel and Co and me in three lines

    Console.WriteLine("Wel\nco\nme");

    // Prints Welcome after a single tab position

    Console.WriteLine("\tWelcome");

    // Returns \Welcome\

    Console.WriteLine("\\Welcome\\");

    // Returns 'Welcome'

    Console.WriteLine("\'Welcome\'");

    // Returns "Welcome"

    Console.WriteLine("\"Welcome\"");

    }

    }

    The output of the above program looks like Figure 3.1

    Figure 3.1

    More C# Articles
    More By Anand Narayanaswamy


     

    C# ARTICLES

    - C# and XML
    - Pointers and Arrays in C#
    - C# 3.0 Extension Methods
    - Overloading Operators in C#
    - Iterators and Nullable Types
    - Patterns and Iterators in C#
    - C# Exceptions
    - Methods in C#
    - Delegates and Events in C#
    - Advanced C#
    - Working with Regular Expressions in C#
    - Sending Simple E-Mail in C#
    - Building C# Comparable Objects: IComparable ...
    - Color Transformation Applications in C# GDI+...
    - Performing Color Transformation Operations i...





    © 2003-2008 by Developer Shed. All rights reserved. DS Cluster 4 hosted by Hostway
    Stay green...Green IT