Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Yes, at least in my experience I try to avoid properties and use function and routines in place. Here is my reasons why:</p> <ol> <li>Cannot use properties with delegates. I believe you can in C# but upon </li> <li>Properties are deceptive, they look like members, but behave like functions. So while you might think you are just looking at a member value you could in fact be initializing the entire system over again because the implementing developer abused lazy instantiation.</li> <li><p>Less Code, while it's not a HUGE amount, defining properties in VB requires at least 2 extra lines of code per get or set. The Overhead is double the lines of actual code for a single assignment or return operation. Although small this makes reading code much more difficult, VB is already an obsessively wordy language.</p> <pre><code>Private ReadOnly Property Foo As String Get Return Bar End Get End Property </code></pre> <p>vs</p> <pre><code>Private Function Foo As String Return Bar End Function </code></pre></li> <li><p>Properties are less flexible you must return what the same value you get. In Other words you can't set the value using a <code>String</code> and get using an <code>Integer</code> or overload setting with a <code>String</code>, or an <code>Integer</code>.</p></li> </ol> <p>Now to be fair the Reasons I use Properties is to get the <code>=</code> syntax for setting, which this doesn't apply when you have a read only property. Also Properties can be set in the VS editor in the properties dialog.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload