Help with Converting C# to vb

Member_2_7967119
Member_2_7967119 used Ask the Experts™
on
I have used couple of free ware to convert C# to Vb but the converted file is not compiling.

Could I get some help with have the C# file (attached) converted to Vb and also it should be working.

I am using ASP.net and VB environment.
TestDataC.txt
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
AndyAinscowFreelance programmer / Consultant

Commented:
>> but the converted file is not compiling.

Letting us know the errors you get would help.

Author

Commented:
the following statement

 var sslFailureCallback = new RemoteCertificateValidationCallback(delegate { return true; });
            ServicePointManager.ServerCertificateValidationCallback += sslFailureCallback;

is being converted to

Dim sslFailureCallback As var = New RemoteCertificateValidationCallback(delegate, {, true)
UnknownUnknownServicePointManager.ServerCertificateValidationCallback = (ServicePointManager.ServerCertificateValidationCallback + sslFailureCallback)
Sr. System Analyst
Commented:
try

Dim sslFailureCallback = New RemoteCertificateValidationCallback(Function() True)
ServicePointManager.ServerCertificateValidationCallback += sslFailureCallback

Open in new window


http://converter.telerik.com/
Bootstrap 4: Exploring New Features

Learn how to use and navigate the new features included in Bootstrap 4, the most popular HTML, CSS, and JavaScript framework for developing responsive, mobile-first websites.

anarki_jimbelSenior Developer

Commented:
The line
Dim sslFailureCallback As var = New RemoteCertificateValidationCallback(delegate, {, true)

Open in new window

is definitely wrong: some strange commas, unclosed braces...

May be something like below?

Dim sslFailureCallback = New RemoteCertificateValidationCallback(Function() True)

Open in new window

anarki_jimbelSenior Developer

Commented:
It was late! :D

Author

Commented:
Let me try and revert back
anarki_jimbelSenior Developer

Commented:
This question has been inactive for 14 days. Two people gave the same solution. Points are awarded to the first given solution.

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial