有人知道等价吗?
目前我在做..
Dim myUsers As New MembershipUserCollection
Dim myUser As MembershipUser
Dim RoleUsers() As String
RoleUsers = Roles.GetUsersInRole("User")
For Each x As String In RoleUsers
Dim roleUser As MembershipUser
roleUser = Membership.GetUser(x)
If Not roleUser Is Nothing Then
myUsers.Add(Membership.GetUser(x))
End If
Next
只是想知道是否有类似的东西..
If MembershipUser.TryParse(Membership.GetUser(x),myUser) Then
myUsers.Add(myUser)
End If
VB 或 C# 工作。