c# - uri scheme property meaning -


perhaps it's not practical question still...

        var u1 = new uri("esnode0:9200");         var u2 = new uri("esnode1:9200");         var u3 = new uri("esnode2:9200");         var u4 = new uri("esnode3:9200");         var u5 = new uri("esnode4:9200");          var urilist = new list<uri>() { u1, u2, u3, u4, u5 };          if (urilist.select(u => u.scheme).distinct().count() > 1)             throw new argumentexception("all uris should of same scheme"); 

in code declaring 5 uris without uri scheme. in end when try see have same uri scheme in list turns out that... well, no. scheme uri uri without port. know can fixed prepending protocol each of uris. what's reason such behavior? isn't safer set uri null in case?


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -