I'm currently building an asp.net web application. I want create some static method as helper methods. Is it a good idea or would I run into problems later on? No fields or properties. Just methods, some with return type and some with no return type.
Is static method shared across all users like fields and properties or are they unique?
private static string userName;
public static string UserName
{
get
{
if (User.Identity.IsAuthenticated)
{
if (userName == "" || userName == null)
{
userName = User.Identity.Name;
}
return userName;
}
else
{
throw new ArgumentNullException("Illegal Access", "You're not login or authorize to perform such task");
}
}
}