Results 1 to 5 of 5

Thread: what is the meaning of (Guid) in c#

Hybrid View

  1. #1
    Junior Member
    Join Date
    Jul 12
    Posts
    22

    what is the meaning of (Guid) in c#

    what is the meaning of (Guid) in c#

    i saw this while making windows form application while using c# ,working on data set .

  2. #2
    Frenzied Member Evil_Giraffe's Avatar
    Join Date
    Aug 02
    Location
    Suffolk, UK
    Posts
    1,880

    Re: what is the meaning of (Guid) in c#

    A little more context would be helpful. I'm guessing that you've found it infront of an expression, in which case it is converting the value of the expression into a value of type Guid

  3. #3
    Junior Member
    Join Date
    Jul 12
    Posts
    22

    Re: what is the meaning of (Guid) in c#

    Quote Originally Posted by Evil_Giraffe View Post
    A little more context would be helpful. I'm guessing that you've found it infront of an expression, in which case it is converting the value of the expression into a value of type Guid
    DataSet carinventoryDS= new DataSet("Car Inventory");
    carinventoryDS.ExtendedProperties["TimeStamp"] = DateTime.Now;
    carinventoryDS.ExtendedProperties["DataSetID"]=Guid.NewGuid();

  4. #4
    Frenzied Member Evil_Giraffe's Avatar
    Join Date
    Aug 02
    Location
    Suffolk, UK
    Posts
    1,880

    Re: what is the meaning of (Guid) in c#

    Guid.NewGuid() is calling the static NewGuid() method on the Guid class. 'Guid' is the type name. If you've not changed your IDE colours, it'll show up in a sort of duck-egg blue to indicate it is a type. What this method returns is a Guid instance (i.e. an object of type Guid, not the type itself) that has been poplated with a unique value via one of the GUID generation algorithms.

  5. #5
    Fanatic Member x-ice's Avatar
    Join Date
    Mar 04
    Location
    UK
    Posts
    671

    Re: what is the meaning of (Guid) in c#


Posting Permissions

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