Is it possible to refactor this extension method?

后端 未结 6 793
小鲜肉
小鲜肉 2020-12-24 07:40

I have the following extension method:

public static void ThrowIfArgumentIsNull(this T value, string argument) 
    where T : class
{
    if (value          


        
6条回答
  •  旧时难觅i
    2020-12-24 08:33

    I find it easiest to do this using a code snippet.

    In your example, I can type tnaqwerty.

    Here is the snippet:

    
    
        
            
    Check for null arguments tna Code snippet for throw new ArgumentNullException SLaks Expansion SurroundsWith
    Parameter Paremeter to check for null value

提交回复
热议问题