Not all code paths return a value - where?

前端 未结 7 1206
我在风中等你
我在风中等你 2021-01-26 06:03

I have the following C# code. For reasons I won\'t go into, this is the required way of localising.

My problem is, I cannot for the life of me figure out what path is no

7条回答
  •  执念已碎
    2021-01-26 06:38

    if(StringNotFound)

    If this is false there is no else statment to catch it.

    use

    if(StringNotFound)
    {
    //your code
    }
    Else
    {
    return "String not found!";
    }

提交回复
热议问题