With End Block - VB.Net

There is no direct equivalent to this in C#

oHttpWebRequest.Method = "GET"; 
oHttpWebRequest.TimeOut = 10000

You can use object initializers

MyClass myObject = new SuperHero(); 
myObject = new MyClass() {Name="Text", Value=3 }


VB.Net


With oHttpWebRequest 
.Method = "GET"
.TimeOut = 10000
End With


Dim myObject As MyClass; 
myObject = New MyClass;

With myObject
.Name = "Text"
.Value = 3
End With



© 2022 Better Solutions Limited. All Rights Reserved. © 2022 Better Solutions Limited TopPrevNext