- String MyString = " This is an test string ";
- Console.WriteLine(MyString.Trim());
DGL https://delphigl.com/forum/ |
|
C# like classes in delphi? https://delphigl.com/forum/viewtopic.php?f=19&t=6232 |
Seite 1 von 1 |
Autor: | noeska [ Do Dez 21, 2006 20:13 ] |
Betreff des Beitrags: | C# like classes in delphi? |
In C# you have special classes like String that work like this Code:
It class like the String class is created like this: http://www.codeproject.com/useritems/Cs ... erator.asp Is it possible to use something like this in Delphi ((win32) 2005/turbo)? I know something like this is possible for arrays. E.g. MyObject[i] instead of MyObject.Lines[i]. Thanks for your answers in advance. |
Autor: | LarsMiddendorf [ Do Dez 21, 2006 21:52 ] |
Betreff des Beitrags: | |
Delphi 2006/ Turbo Delphi has operator overloading for .Net(class and record) and Win32(record only, not Delphi2005). This includes the implicit conversion operator. Code:
|
Autor: | noeska [ Do Dez 21, 2006 22:17 ] |
Betreff des Beitrags: | |
I got the following answer on the pascalgamedevelopment forum: Code:
This seem to do what i want, thanks jsoftware. Also thanks to Lars. This allow to do some good things in delphi e.g. for vectors, martices etc... Where can i find explanations of all operators for records in the delphi help, i cannot find it as i get lost in the delphi help. |
Seite 1 von 1 | Alle Zeiten sind UTC + 1 Stunde |
Powered by phpBB® Forum Software © phpBB Group https://www.phpbb.com/ |