MembershipUserCollection.Clear 方法

定义

从集合中删除所有成员资格用户对象。

public:
 void Clear();
public void Clear ();
member this.Clear : unit -> unit
Public Sub Clear ()

示例

下面的代码示例先清除 , MembershipUserCollection 然后再将其替换为 方法的结果 GetAllUsers

MembershipUserCollection users = Membership.GetAllUsers();

// Code to modify MembershipUserCollection here.

users.Clear();
users = Membership.GetAllUsers();
Dim users As MembershipUserCollection = Membership.GetAllUsers()

' Code to modify MembershipUserCollection here.

users.Clear()
users = Membership.GetAllUsers()

适用于

另请参阅