Solved

How do I create a GUID that's all zero?

Posted on 2008-10-28
4
1,185 Views
Last Modified: 2010-05-18
I have a method that takes a GUID but i just want to pass it a generic...all zero GUID.

I tried a lot of things and none worked:

myMethod(DeleteOrderRows_GP(Order.Number,"O", new Guid((byte) 0));

myMethod(Order.Number,"O", new Guid[0]);

myMethod(Order.Number,"O", new Guid(0));
0
Comment
Question by:Camillia
  • 2
4 Comments
 
LVL 14

Expert Comment

by:CtrlAltDl
Comment Utility
Try this:
myMethod(Order.Number,"O", new Guid '0000000-0000-0000-0000-000000000000');

or this:
myMethod(Order.Number,"O", new Guid.Empty);
0
 
LVL 14

Accepted Solution

by:
CtrlAltDl earned 400 total points
Comment Utility
Oops, last line should be:
myMethod(Order.Number,"O", Guid.Empty);
0
 
LVL 7

Author Comment

by:Camillia
Comment Utility
let me try.
0
 
LVL 12

Assisted Solution

by:andrewjb
andrewjb earned 100 total points
Comment Utility
Guid.Empty

:-)

0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Introduction                                                 Was the var keyword really only brought out to shorten your syntax? Or have the VB language guys got their way in C#? What type of variable is it? All will be revealed.   Also called…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
This video discusses moving either the default database or any database to a new volume.

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now