09-28-04 10:52 PM
Hi Neal,
Try this:
vStrGUID = System.String.Format ("{0}", System.Guid.NewGuid ());
I often find I have to jump through a few hoops to get XLANG/s to do
something.
It would be good to see some examples of "Best Practices" and code examples.
Regards,
Alan
"Neal Walters" wrote:
>
> I'd like to convert a GUID to a string on one line of code instead of two.
>
> //Biztalk does not like either of these two lines of code
> // which work fine in C# (vStrGUID is a string variable)
> // Says "illegal dotted name" on the Guid().ToString
> // and says "an object ref is required for a non-static field
>
> //vStrGUID = System.Guid.NewGuid().ToString();
> //vStrGUID = (System.Guid.NewGuid()).ToString();
>
> // This works fine (so far)
> vGUID = System.Guid.NewGuid();
> vStrGUID = vGUID.ToString();
>
> Is this one of those cases where XLangS is just different than C#???
>
> Thanks in advance,
> Neal Walters
> http://Biztalk-Training.com - Biztalk 2004 Training Videos
>
[ Post a follow-up to this message ]
|