Results 1 to 4 of 4

Thread: what is the use of new key word

  1. #1

    Thread Starter
    Fanatic Member karthikeyan's Avatar
    Join Date
    Oct 2005
    Location
    inside .net
    Posts
    919

    what is the use of new key word

    hi,

    1) i would like to know what is the use of new key word in the following examle

    class1 c=new class1

    2)what is the use of static keyword in the following example:

    public static int a

    please let me know
    Loving dotnet

  2. #2
    Shared Member
    Join Date
    May 2005
    Location
    Kashmir, India
    Posts
    2,277

    Re: what is the use of new key word

    How about trying to look at the MSDN reference? A simple search would have landed you here

    new operator
    static keyword
    Use [code] source code here[/code] tags when you post source code.

    My Articles

  3. #3
    Hyperactive Member drattansingh's Avatar
    Join Date
    Sep 2005
    Posts
    395

    Re: what is the use of new key word

    The new keyword creates an object.

    A static member belongs to a class rather than objects of a class.


    Google it and I'm sure that you will find much more detailed explainations. I just used from the top of my head as to how I understand it.

  4. #4
    Hyperactive Member drattansingh's Avatar
    Join Date
    Sep 2005
    Posts
    395

    Re: what is the use of new key word

    Sorry Shuja Ali. I didn't see the links you posted.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width