Null out parameters in C#?

后端 未结 6 1141
深忆病人
深忆病人 2021-01-17 11:19

After reading on stackoverflow that in the case of checking the format of a DateTime you should use DateTime.TryParse. After trying some regex expressions they seem to get l

6条回答
  •  滥情空心
    2021-01-17 11:45

    No. You can't get rid of the variable but you shouldn't get a compiler warning either.

    Passing a variable as out is "using" the variable. The compiler will not issue a warning because of that.

提交回复
热议问题