02-12-2012, 02:50 PM
كود :
بالتوفيق ومن كان عنده إضافة علم فلا يحرمنا منها .
كود :
ولعل الطريقة هذه فقط في delphi2010
class helper : لقد حل العديد من مشاكل ال OOP , لدي مثال في ال VCL Style Extractor
ألق نظرة على الوحدة SMPStyle
كود :
http://www.delphi4arab.net/forum/showthread.php?tid=7969كما هناك ال Record Helper

PHP كود :
type intHelper =record helper for integer
public
Function ToString():String;
end;
function intHelper.ToString: String;
begin
result:=IntToStr(Self);
end;
الآن يمكننا الكتابة بالشكل التالي :
PHP كود :
var MyInt:integer ;
begin
MyInt:=2013;
Caption:=MyInt.ToString ;
end;
و السلام عليكم


![[-]](https://delphi4arab.net/forum/D4A2020/collapse.png)