Disregarding CASE in a string

Ok so I would like to detect the extension of files and treat the files differently based on their extension.

But some files of the same filetype have different extensions like ".Mp3" or ".mp3" forexample. So in stead of doing something like:

if(string extension == ".mp3" || extension == ".Mp3" || extension == ".mP3") and so on, is there a way to eliminate the case or disregard the case?

Thanks,

paoloTheCool

[494 byte] By [paoloTheCool] at [2008-1-10]
# 1
if (extension.ToLower() == ".mp3")
{
return true;
}

or

if (extension.ToUpper() == ".MP3")
{

return true;
}
CameronKloot at 2007-10-3 > top of Msdn Tech,Visual Studio Express Editions,Visual C# 2005 Express Edition...