Possible to pass null from Powershell to a .Net API that expects a string?

后端 未结 3 1218
醉梦人生
醉梦人生 2020-12-16 16:50

API:

namespace ClassLibrary1
{
    public class Class1
    {
        public static string Test(string input)
        {
            if (input == null)
                


        
3条回答
  •  感情败类
    2020-12-16 17:08

    According to this MS connect issue, this is a known problem. There are a couple workarounds posted there, too, like using reflection to pass the paramaters (which is clever, but kinda silly that it's required). Cheers!

提交回复
热议问题