For an app I needed some GUID's at runtime. In the COM days I used the CoCreateGuid for that. In .NET it is much simpler, it is even so simple I overlooked it and spent far to long looking for a way to import the COM stuff in my code. So let me share what I found in the help file.
The Guid class has a static meber which will get me my guid:
aanmelding.ReplyGuid = System.Guid.NewGuid().ToString();
This one-liner generates a new guid and puts it in string format into my field. That's all.
Peter