title: How do I create a delegate for a .NET property?
body: <p>I am trying to create a delegate (as a test) for:</p>
  
  <pre><code>Public Overridable ReadOnly Property PropertyName() As String
  </code></pre>
  
  <p>My intuitive attempt was declaring the delegate like this:</p>
  
  <pre><code>Public Delegate Function Test() As String
  </code></pre>
  
  <p>And instantiating like this:</p>
  
  <pre><code>Dim t As Test = AddressOf e.PropertyName
  </code></pre>
  
  <p>But this throws the error:</p>
  
  <blockquote>
    <p>Method 'Public Overridable ReadOnly Property PropertyName() As
    String' does not have a signature
    compatible with delegate 'Delegate
    Function Test() As String'.</p>
  </blockquote>
  
  <p>So because I was dealing with a property I tried this:</p>
  
  <pre><code>Public Delegate Property Test() As String
  </code></pre>
  
  <p>But this throws a compiler error.</p>
  
  <p>So the question is, how do I make a delegate for a property?</p>
  
  <hr>
  
  <p>See this link:</p>
  
  <p><a href="http://peisker.net/dotnet/propertydelegates.htm" rel="noreferrer">http://peisker.net/dotnet/propertydelegates.htm</a></p>