如何从字符串转换为GUID [英] How to convert from string to guid

查看:115
本文介绍了如何从字符串转换为GUID的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,

我正在使用
生成guid

Hi all,

i''m generating guid by using

Public getItem(ByVal dc As Item ) As Result
    Dim s As String = Guid.NewGuid.ToString
    dc.Guid = New Guid(s)
End Function


但我仍然获得dc.guid = empty
的价值
请给我一个适当的解决方案.


but still i''m getting value of dc.guid=empty

pls give me a proper solution for it.

推荐答案

为什么需要这样做? dc.guid = guid.newguid解决了您的问题,不是吗?
Why do you need to do this ? dc.guid = guid.newguid solves your problem, doesn''t it ?


这篇关于如何从字符串转换为GUID的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆