开发者

C# to VB.net conversion [closed]

开发者 https://www.devze.com 2023-03-20 00:45 出处:网络
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 po
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

精彩评论

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