Показать сообщение отдельно
Старый 30.10.2014, 11:51   #1  
Blog bot is offline
Blog bot
Участник
 
25,644 / 848 (80) +++++++
Регистрация: 28.10.2006
Any function that accepts only one parameter can be called as if it were a property, and this applies to built-in system functions, your own custom functions, and even .NET methods alike. Instead of doing it like Report50001.SetDefaultPostingDate(101015D) you can always do it like Report50001.SetDefaultPostingDate := 101015D. Of course you can improve semantics of your code significantly if you simply call the function PostingDate instead of SetDefaultPostingDate, then you can just write Report50001.PostingDate := 101015D;

Remember – this works for all function types, even .NET method calls.

Read this post at its original location at http://vjeko.com/blog/improving-sema...ion-properties, or visit the original blog at http://vjeko.com. 5e33c5f6cb90c441bd1f23d5b9eeca34The post Improving semantics through function properties appeared first on Vjeko.com.

</img> </img>

Читать дальше
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.