vb.net - Converting VB sub procedure to C# -


In VB, I have classes that look like:

  public class example Public Test 1 Like New List (String) Public Examination 2 New List (In String) Public Initiative () // Code Logic Here End Sub and Class  

I understand That this sub-init () process works like a main method in C #, in which the example class is used every time, this method Starts automatically. Is it right to understand? How will all this process be written in C #?

I understand that this sub-init () process is a key method in C # Works like this, in which example squares are used every time, this method is automatically started.

No, it does not seem right either in method or to main C # in the method, as far as I know.

This is a method called bus init , nothing special about it if it was a new method , Which would conform to the C # constructor, but this is a different matter.

Your class equals:

  using System.Collections.Generic; Public class examples {public list & lt; String & gt; Test1 = new list & lt; String & gt; (); Public listing & lt; String & gt; Test2 = new list & lt; String & gt; (); Public Zero Init () {// code logic here}}  

It is possible that this class is being used in some settings that automatically Init methods And executes them with reflection, but that is not part of the VB language.


Comments