Y
yanyading
Unregistered / Unconfirmed
GUEST, unregistred user!
代码:
unit Unit1;
interface
uses
Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
Dialogs;
type
TForm1 = class(TForm)
function Pro_String_Read (const Value: String): String;
function Pro_String_Write (const Value: String): String;
property S: String read Pro_String_Read write Pro_String_Write;
// 这个有一个错误: Incompatible types 如何解决,原因是什么?谢谢!~
private
{ Private declarations }
public
{ Public declarations }
end;
var
Form1: TForm1;
implementation
function TForm1.Pro_String_Read (const Value: String): String;
begin
Result := 'The DIY Property is ' + Value;
end;
function TForm1.Pro_String_Write (const Value: String): String;
begin
Self.Caption := 'The DIY Property is ' + Value;
end;
{$R *.dfm}
end.