Results 1 to 4 of 4

Thread: Type alias in Csharp

  1. #1
    Join Date
    Sep 2009
    Posts
    131

    Type alias in Csharp

    I am assigned to work on a project on Microsoft .NET. This requires me to be friendly with Csharp. I have never learnt any programming language in detail and now I have to learn Csharp. I am not able to grasp many of its concepts. I am not getting what is a type alias in Csharp. Please help this is my first project.

  2. #2
    Join Date
    Apr 2008
    Posts
    1,948

    Re: Type alias in Csharp

    The Common Language Runtime designed by Microsoft is said to be the Heart of .Net. There are a few aliases which are there in C# that can be used for intrinsic Common Language Runtime. Alias means another name. We can make use of aliases instead of types and vice-versa. So therefore, we can use System.Int32 inplace of the keyword int.

  3. #3
    Join Date
    Apr 2008
    Posts
    2,005

    Re: Type alias in Csharp

    Csharp is really the most useful language to work on .NET platform application. I too had hard time initially to study the Csharp concepts. A type
    alias is simple another keyword for Commmon Language Runtime Type in Csharp.
    eg.
    Code:
    string aliaseg = new System.String ('*', 7);
    In the above example, we have used string keyword as an alias for Common Language Runtime type System.String

  4. #4
    Join Date
    May 2008
    Posts
    2,389

    Re: Type alias in Csharp

    Csharp has a feature that allows its user to make use of an "alias" for a namespace. Thus consider this namespace: MadProps.Windows.Controls. You can make a use of an alias as:
    using mpc = MadProps.Windows.Controls;
    Thus now you can use mpc instead of using MadProps.Windows.Controls again and again.

Similar Threads

  1. BOXING and UNBOXING in CSharp
    By Izek in forum Software Development
    Replies: 3
    Last Post: 21-11-2009, 11:57 PM
  2. Lambda expressions in Csharp
    By Izek in forum Software Development
    Replies: 3
    Last Post: 17-11-2009, 04:32 AM
  3. Are constructors in Csharp inherited?
    By Joel5 in forum Software Development
    Replies: 3
    Last Post: 14-11-2009, 06:47 PM
  4. Exception Handling in Csharp
    By Jesus2 in forum Software Development
    Replies: 3
    Last Post: 11-11-2009, 11:22 PM
  5. What do you mean by Csharp Delegates?
    By Jarini in forum Software Development
    Replies: 3
    Last Post: 11-11-2009, 09:57 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,751,853,165.88997 seconds with 16 queries