|
using System;
namespace ClassLibrary1
{
/// <summary>
/// Summary description for Class1.
/// </summary>
public class MyObject
{
public MyObject(string strName)
{
_strName = strName;
}
#region Public Properties
private string _strName;
public string Name
{
get
{
return _strName;
}
}
#endregion
#region Public Methods
public string MyPublicMethod(string strInput)
{
return this.Name + ": " + strInput;
}
public string PrivateMethodWrapper(string strInput, double dbl)
{
return MyPrivateMethod(strInput, DateTime.Now, dbl);
}
#endregion
#region Protected Methods
protected string MyProtectedMethod(string strInput, int i32Value)
{
return this.Name + ": " + strInput + ", " + i32Value.ToString();
}
#endregion
#region Private Methods
private static string MyPrivateStaticMethod(string strInput, double dbl)
{
return strInput + ", " + dbl.ToString();
}
private string MyPrivateMethod(string strInput, DateTime dt, double dbl)
{
return this.Name + ": " + strInput + ", " + dt.ToString() + ", " + dbl.ToString();
}
#endregion
} //end of class
} //end of namespace
|
By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.
If a file you wish to view isn't highlighted, and is a text file (not binary), please
let us know and we'll add colourisation support for it.
Tim Stall is a Chicago-based technical consultant for Computer Sciences Corporation (www.csc.com), a leading global IT services company. In addition to his expertise in Microsoft.Net development projects and enterprise architecture, Tim's .Net experience includes, writing technical publications, leading internal training, and having MCAD certification. His blog is at http://timstall.dotnetdevelopersjournal.com/.