ProfileInfoCollection.Add(ProfileInfo) 方法
定義
重要
部分資訊涉及發行前產品,在發行之前可能會有大幅修改。 Microsoft 對此處提供的資訊,不做任何明確或隱含的瑕疵擔保。
將指定的 ProfileInfo 物件加入集合中。
public:
void Add(System::Web::Profile::ProfileInfo ^ profileInfo);
public void Add(System.Web.Profile.ProfileInfo profileInfo);
member this.Add : System.Web.Profile.ProfileInfo -> unit
Public Sub Add (profileInfo As ProfileInfo)
參數
- profileInfo
- ProfileInfo
一個 ProfileInfo 要加入收藏的物件。
例外狀況
本合集為唯讀。
ProfileInfo集合中存在與值相同的UserNameprofileInfo物件。
範例
關於在資料庫中建立ProfileProvider使用者設定檔的實作範例ProfileInfoCollection,請參見「實作設定檔提供者」。
備註
此Add方法常被設定提供者實作者用來填充 a ProfileInfoCollection 以從抽象類別的 GetAllProfiles 、 GetAllInactiveProfiles、 FindProfilesByUserName或 FindInactiveProfilesByUserName 方法回傳ProfileProvider。