Skip to content

Instantly share code, notes, and snippets.

@EifelMono
Last active May 6, 2021 05:45
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EifelMono/dfc33c984b3977b866697bebccd8acf9 to your computer and use it in GitHub Desktop.
Save EifelMono/dfc33c984b3977b866697bebccd8acf9 to your computer and use it in GitHub Desktop.
Für Heinz
using System;
public class Program
{
public static void Main()
{
// für Heinz
// hiermit wird nur ein Object erstellt und der Wert ist empty
var a = new Guid();
Console.Write($"a = {a}");
if (a == Guid.Empty)
Console.Write(" Guid a is empty");
Console.WriteLine();
// hiermit wird eine neue Guid erstellt
var b = Guid.NewGuid();
Console.Write($"b = {b}");
if (b != Guid.Empty)
Console.Write(" Guid b is not empty");
Console.WriteLine();
// hiermit wird eine empty Guid erstellt
var c = Guid.Empty;
Console.Write($"c = {c}");
if (c == Guid.Empty)
Console.Write(" Guid c is empty");
Console.WriteLine();
}
}
@EifelMono
Copy link
Author

Für Heinz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment