GeekArticles
Programming
Delphi
Programming
Delphi"To" Property is not compiled
QC#: 14073 Version: 9.0 Status: Closed defect, no action required Resolution: Behavior is as designed Description: I cannot compile the following bug-free source, because Delphi recognizes the "to" of "MyMail.To" as a reserved word, but it is a property name here:
uses System.Web.Mail;
var
MyMail: System.Web.Mail.MailMessage;
begin
MyMail := System.Web.Mail.MailMessage.Create;
MyMail.From := 'me@work.de';
MyMail.To := 'chief@work.de';
// ...
System.Web.Mail.SmtpMail.SmtpServer := 'mail.gmx.net';
System.Web.Mail.SmtpMail.Send(MyMail);
end;
uses System.Web.Mail;
var
MyMail: System.Web.Mail.MailMessage;
begin
MyMail := System.Web.Mail.MailMessage.Create;
MyMail.From := 'me@work.de';
MyMail.To := 'chief@work.de';
// ...
System.Web.Mail.SmtpMail.SmtpServer := 'mail.gmx.net';
System.Web.Mail.SmtpMail.Send(MyMail);
end;
Sponsored Links
Read Next: Demystifying Class Helpers in Delphi 2005
Related Topics
Subscribe via RSS
Delphi
- A load of ASP.NET related tutorials, articles, tips and tricks!
- How to move PageControl's tabs using drag'n'drop
- Charts in database applications
- Creating Components Dynamically (at Run-Time)
- The role of the "AOwner" parameter in the Create constructor
- Creating a roll up form (with animation)
- Poll: Do you already have some experience with Delphi?
- Creating a database from Delphi code
- TMemoBar - T(Custom)Memo extender
- How to click-and-select a line in TMemo
