Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- /// <summary>
- /// Adds a new %Customer:CustomersLibrary.Customer% to the collection.
- /// </summary>
- /// <returns>A new Customer instance that represents the new customer.</returns>
- /// <example>
- /// The following example demonstrates adding a new customer to the customers
- /// collection.
- /// <code lang="CS" title="Example">
- /// CustomersLibrary.Customer newCustomer = myCustomers.Add(CustomersLibrary.Title.Mr, "John", "J", "Smith");
- /// </code>
- /// <code lang="VB" title="Example">
- /// Dim newCustomer As CustomersLibrary.Customer = myCustomers.Add(CustomersLibrary.Title.Mr, "John", "J", "Smith")
- /// </code>
- /// </example>
- /// <seealso cref="Remove">Remove Method</seealso>
- /// <param name="Title">The customers title.</param>
- /// <param name="FirstName">The customers first name.</param>
- /// <param name="MiddleInitial">The customers middle initial.</param>
- /// <param name="LastName">The customers last name.</param>
- public Customer Add(Title Title, string FirstName, string MiddleInitial, string LastName)
- {
- // create new customer instance
- Customer newCust = new Customer(Title, FirstName, MiddleInitial, LastName);
- // add to internal collection
- mItems.Add(newCust);
- // return ref to new customer instance
- return newCust;
- }
- /// <summary>
- /// Returns the number of %Customer:CustomersLibrary.Customer% instances in the collection.
- /// </summary>
- /// <value>
- /// An Int value that specifies the number of Customer instances within the
- /// collection.
- /// </value>
- public int Count
- {
- get
- {
- return mItems.Count;
- }
- }
- /// <include file="Documentation/XML/YourClass.xml" path="//documentation/members[@name='YourClass']/*"/>
Add Comment
Please, Sign In to add comment