guid.ToByteArray using Cerbuino Bee

      using System;
      guid = new Guid();
      byte[] valBytes =  guid.ToByteArray();

Results in

An unhandled exception of type ‘System.NullReferenceException’ occurred in mscorlib.dll

According to the 4.2 SDK,this should be supported. Also, works on my test console app. Any ideas? Thank you.

You need to use

guid = Guid.NewGuid();

Awesome. That worked perfectly!

You are welcome!