C# to VB.net conversion [closed]
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 questionCould 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)
精彩评论