Not all code paths return a value - where?

前端 未结 7 1211
我在风中等你
我在风中等你 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条回答
  •  猫巷女王i
    2021-01-26 06:34

    At the very end of your method, if StringNotFound is false:

    if(StringNotFound)
    {
       [...]
    }
    
    // missing return statement here
    

提交回复
热议问题