Difference between C# and VB.Net custom classes -
I have been out of VB.Net for a long time, I have a custom class in C #, which is converted to VB Would like to know the main difference between the net and the two Some things in C # can not seem to accompany classes as used in Vb.Net: Public domain name or public [classname] (Datatable DT) in VB.net
My class looks like the following Is:
Public Sector Subcontractor {Public Ink Organization_Id {Received; Set; } Public difference subcontractor_id {find; Set; } Public int project_id {get; Set; } Public List & amp; Evaluation; Evaluation point & gt; Number {get; Set; } Public Subcontractor () {} Public Sub-Data (Datatelle DT) {organization_id = Convert.ToInt32 (dt.Rows [0] ["organization_id"]. ToString ()); Subcontractor_id = convert toint32 (dt.rows [0] ["subcommand_id"] .toastring ()); Project_id = Convert. ToInt32 (dt.rows [0] ["project_id"]. ToString ()); Number = new list & lt; Evaluate & gt; (); Foreign Currency (Detrore DR in DT RO) {Point. Add (new evaluation point (Dr.)); }} Public Class Appraisal Point {Public Ink category_id {get; Set; } Public int eval_id {get; Set; } Public int rating {get; Set; } Public Evaluation Point () {} Public Evaluation Point (Detroit Dr.) {category_id = Convert.ToInt32 (dr ["category_id"]. ToString ()); Eval_id = Convert ToInt32 (Dr. ["eval_id"]. ToString ()); Rating = Convert. ToInt32 (Dr. ["Rating"]. ToString ()); }}} What are the differences
First of all, Constructors in VB.NET have different syntax:
C #
square fu {public fu {int}} {}} / Pre> VB
Class Fu Public Sub New (Voltage Arguments as Integer) And Sub End Class For the most part You can do anything in VB.NET that you can do in C #, you just have to change your syntax properly. There is a lot of reference material, use it.
Comments
Post a Comment