Equivalente Delphi para C#

<< Click to Display Table of Contents >>

Navigation:  Outros >

Equivalente Delphi para C#

Previous pageReturn to chapter overviewNext page

Primeira coluna: Delphi  segunda coluna:  C#


Basic Datatypes


Variant                                    object (with boxing)  

Assert                                     System.Diagnostics.Debug.Assert



Form Management


TForm.FormStyle = fsMDIForm                Form.IsMDIContainer = true  

TForm.FormStyle = fsMDIChild               Form.MdiParent = ventanaPrincipal;  

TControl.Align                             Control.Dock  

TForm.ShowModal                            Form.ShowDialog()  

Button1.Default := True                    Form.AcceptButton = button1  

TForm.ModalResult, TButton.ModalResult     Form.DialogResult, Button.DialogResult  

TButton.Click                              Button.PerformClick()  

TButton.OnClick                            Button.Click

Screen.ActiveForm                          static Form.ActiveForm 

Application.ExeName                        System.Windows.Forms.Application.ExecutablePath  

Application.OnException                    Application.ThreadException  



Data Access


TCustomConnection (and descendents)        IDbConnection (and implementors)  

TDataSetProvider                           IDbDataAdapter (SqlDataAdapter, OleDbDataAdapter, etc)  

TClientDataSet                             DataSet, DataTable  

TField                                     DataColumn  

TField.Required = True                     DataColumn.AllowDBNull = false  

Variants.Null                              System.DBNull.Value  



Component model


procedure Loaded; override;                Implements ISupportInitialize  

property X ... default 100;                [DefaultValue(100)] int X { get; set; }  

public property X: Y;                      [Browseable(false)] public Y X { get; set; }  

TService (Service app.)                    System.ServiceProcess.ServiceBase