Solved

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

Posted on 2008-10-28
4
1,238 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 14

Expert Comment

by:CtrlAltDl
ID: 22826323
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
ID: 22826331
Oops, last line should be:
myMethod(Order.Number,"O", Guid.Empty);
0
 
LVL 7

Author Comment

by:Camillia
ID: 22826941
let me try.
0
 
LVL 12

Assisted Solution

by:andrewjb
andrewjb earned 100 total points
ID: 22829838
Guid.Empty

:-)

0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

705 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