delphi、c#数据类型比较

来源:互联网 发布:linux清除arp表 编辑:程序博客网 时间:2024/06/03 14:09


delphi 整数类型的表述


同一行的,表示的是相同范围的数。

shortint ---- int8 -128..127 
smallint ---- int16  SHORT -32768..32767
integer  Longint ----- int32 LONG

int64 -----LONGLONG Largeint   LONG64

NativeInt ----  IntPtr    INT_PTR  LONG_PTR  SSIZE_T

下面是无符号数

byte ---- UInt8 UCHAR 
Word ---- UInt16 USHORT 
cardinal  LongWord  ----  UInt32 ULONG UINT DWORD ULONG32           0..4294967295
UInt64--------- DWORDLONG   ULONGLONG  ULONG64  DWORD64 Largeuint

NativeUInt ---------- UIntPtr     UINT_PTR  ULONG_PTR  DWORD_PTR  SIZE_T


delphi 和c# dataType 比较

Delphi DataTypeC# datatypeansistringstringbooleanboolbytebytecharcharcompdoublecurrencydecimaldoubledoubleextendeddoubleint64longint32intint16shortintegerintlongintintlongworduintolevariantobjectpcharstringrealdoublereal48doubleshortintsbytesinglefloatsmallintshortstringstringvariantobjectwidecharstringwidestringstringwordushorttextfileSystem.IO.FileInfotdateSystem.DateTimetdatetimeSystem.DateTimetfiletimeSystem.DateTimehresultlongpointerobjectansicharcharfileSystem.IO.Fileplongintintpintegerintpcardinaluintpworddoublepdworddoublepsmallintshortpbytebytepshortintshortpint64longplongworduintpsinglefloatpdoubledoublepdateSystem.DateTimepdispatchobjectppdispatchobjectperrorobjectpwordboolboolpunknownobjectppunknownobjectppwidecharstringppcharstringppansicharstringpansicharstringpextendeddoublepcompdoublepcurrencydoublepvariantobjectpolevariantobjectppointerobjectpbooleanboolpdatetimeSystem.DateTimethandlelongtresultlongcardinaluinttbytearraybyte[]twordarrayint[]dwordintpstringstringpwidestringstringtsystemtimeSystem.DateTimebyteboolboollongboolboolwordboolboolhmodulelongtlargeintegerintplargeintegerintpwidecharstringtoleenumlongpbytearraybyte[]pwordarrayint[]pansistringstringptextbufstringshortstringstringutf8stringstringtextSystem.IO.StreamtextfileSystem.IO.StreamtextinputSystem.IO.TextReadertextoutputSystem.IO.TextWriterttypeinfoSystem.Typetbytessbyte[]