开发者

C# to VB.net conversion [closed]

Closed. This question needs to be more focused. It is not currently accepting answers.

Want to improve this question? Update the question so it focuses on one problem only by editing this post.

Closed 8 years ago.

开发者_如何学编程 Improve this question

Could you please convert this two lines of code to VB.net?

MembershipUser newUser = Membership.GetUser(reg.UserName);
Guid newUserID=(Guid)newUser.ProviderUserKey;


http://www.developerfusion.com/tools/convert/csharp-to-vb/ outputs:

'reg is CreateUserWizard
Dim newUser As MembershipUser = Membership.GetUser(reg.UserName)
Dim newUserID As Guid = DirectCast(newUser.ProviderUserKey, Guid)


Try this:

'reg is CreateUserWizard
Dim newUser As MembershipUser = Membership.GetUser(reg.UserName)
Dim newUserID As Guid = DirectCast(newUser.ProviderUserKey, Guid)
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜