.NET
•  Greatis •  Security •  AppDatabase •  Utilities •  Delphi/CB • Visual Basic •  just4fun
.NET Software
.NET Components for Visual Studio .NET, Delphi 8, Delphi 2005 and Delphi 2006
 .NET     Entire site
More Info
Delphi to C#
Index

.NET
Form Designer .NET

See also
Delphi VCL software
Visual Basic 6 software
Hot Offer

Form Desigber .Net


  Delphi  

       Record is a set of heterogeneous items:
var
  Rec = record
    I: Integer;
    S: string;
  end;
You can define the record type and use it for defining the record variables:
type
  RecType: record
    I: Integer;
    S: string;
  end;
var
  R1,R2: RecType;
Record can have variant part that allows to store different data (the case tag and constants in the list play no role):
var
  XData: record
    Name: string;
    case Integer of
      0: (Price: Integer);
      1: (Enabled: Boolean);
      2: (CatalogItem: Char);
  end;
Record fields can be accessed by the field name:
XData.Name:='Form Designer .NET';
XData.Price:=200;
This code can be shorted by the with statement:
with XData do
begin
  Name:='Form Designer .NET';
  Price:=200;
end;
The global record variables can be preinitialized:
var
  XData: record
    Name: string;
    case Integer of
      0: (Price: Integer);
      1: (Enabled: Boolean);
      2: (CatalogItem: Char);
  end = (Name:'Form Designer .NET'; Price:200);
 
 
  C#

In C# struct is almost class. Structure cannot be inherited - it's the only difference between class and struct. Structure can have fields with any access modifier, but protected. Structure can have constructors, constants, methods, events and so on. In fact it's a non-inheritable class, that can implement interfaces. Too compilcated, isn't it?

Lost features      You can have rich functionality within stuct.
Added features
Warnings Be careful when choosing between class and struct.
Additional information

 
 


Greatis Software Greatis | Security | AppDatabase | Utilities | Delphi/CB | Visual Basic | .NET | just4fun

Contacts | Add to Favorites | Recommend to a Friend | Privacy Policy | Copyright © 1998-2009 Greatis Software

eXTReMe Tracker