I have a StringUtilities.cs file in the CommonFunctions Project that holds a UppercaseFirst function that Uppercases the first word in a string. Currently in the .aspx.cs in a separate Project (in the same Solution) that is utilizing this function is called using MyProject.CommonFunctions.StringUtilities.UppercaseFirst("hello world");
Is it possible to shorten it to just UppercaseFirst("hello world"); ? Readability will be so much better.
StringUtilities.cs in the CommonFunctions Project:
namespace MyProject.CommonFunctions
{
public class StringUtilities
{
public static string UppercaseFirst(string s)
{//blah code}
}
}
Default.aspx.cs
using MyProject.CommonFunctions;
...
protected void Page_Load(object sender, EventArgs e)
{
MyProject.CommonFunctions.StringUtilities.UppercaseFirst("hello world");
}