What is wrong with this c# method?

Posted by bala3569 on Stack Overflow See other posts from Stack Overflow or by bala3569
Published on 2010-04-20T12:40:06Z Indexed on 2010/04/20 12:43 UTC
Read the original article Hit count: 305

Filed under:
|
|

I use this method to get file extension,

public string ReturnExtension(string fileExtension)
    {
        switch (fileExtension)
        {
            case ".doc":
            case ".docx":
                return "application/ms-word";
        }
    }

When i compile it i got the error BaseClass.ReturnExtension(string)': not all code paths return a value.. Any suggestion...

© Stack Overflow or respective owner

Related posts about c#

Related posts about string