R
Robert Dufour
I am trying to understand what the following code does. More specifically
after the :base word
I understand that it Creates an Object MembershipUserWrapper to which a
parameter of type MembershipUser that will be named mu in the function is
passed.
The : base means that it creates a new object derived from the base class
which is a system.web.security.membership object
My question is with the mu.ProviderName and following parameters.
What does it DO? does it assign the provider name of the passed mu to the
new base or does it apply the value of the new base class to the
corresponding mu property?
Code below
Thanks for any help
Bob
/// This constructor is used to create a MembershipUserWrapper
/// from a MembershipUser object.
/// MembershipUser is a default type used
/// in the Membership API provided with ASP.NET 2.0
/// </summary>
/// <param name="mu">MembershipUser object</param>
public MembershipUserWrapper(MembershipUser mu)
: base(mu.ProviderName, mu.UserName, mu.ProviderUserKey, mu.Email,
mu.PasswordQuestion,
mu.Comment, mu.IsApproved, mu.IsLockedOut, mu.CreationDate,
mu.LastLoginDate, mu.LastActivityDate,
mu.LastPasswordChangedDate, mu.LastLockoutDate)
{
}
after the :base word
I understand that it Creates an Object MembershipUserWrapper to which a
parameter of type MembershipUser that will be named mu in the function is
passed.
The : base means that it creates a new object derived from the base class
which is a system.web.security.membership object
My question is with the mu.ProviderName and following parameters.
What does it DO? does it assign the provider name of the passed mu to the
new base or does it apply the value of the new base class to the
corresponding mu property?
Code below
Thanks for any help
Bob
/// This constructor is used to create a MembershipUserWrapper
/// from a MembershipUser object.
/// MembershipUser is a default type used
/// in the Membership API provided with ASP.NET 2.0
/// </summary>
/// <param name="mu">MembershipUser object</param>
public MembershipUserWrapper(MembershipUser mu)
: base(mu.ProviderName, mu.UserName, mu.ProviderUserKey, mu.Email,
mu.PasswordQuestion,
mu.Comment, mu.IsApproved, mu.IsLockedOut, mu.CreationDate,
mu.LastLoginDate, mu.LastActivityDate,
mu.LastPasswordChangedDate, mu.LastLockoutDate)
{
}