Hi. I'm want to do a class with file extensions, I thought the extensions should be strings. My problem is I'm not sure how to do this class? I want it to be kinda static so I don't have to declare it like new. I would appreciate any help I can get on this, it's often I find myself in situations where I would need a class like this.
EDIT
I'm trying to do a class that got a List or just a string[] with different extensions, like ".png", ".jpg" ect as a list. so I can later on in my Controller check if the file input has one of those extensions that are "valid".
Not really a reason to down vote -3 for this and there are acutually people who got the question and there are valid answers so if you want to close this fine. let me just get the code.
EDIT CODE
I later on just use the file extension from the file and check if this list contain it. Simple for pice of code most think but helpful for newbies and its actually pretty handy instead of writing the fileExt != ".png"
ect all the time.
public static class FileExtensionsPicture
{
public static List<string> ExtensionList = new List<string> { ".png", ".jpg" };
}
Thanks