title: Using the typical get set properties in C#... with parameters
body: <p>I'd like to do the same in C#. Is there anyway of using properties in C# with parameters in the same way I've done with the parameter 'Key' in this VB.NET example?</p>
  
  <blockquote>
  <pre><code>Private Shared m_Dictionary As IDictionary(Of String, Object) = New Dictionary(Of String, Object)
  </code></pre>
  </blockquote>
  
  <pre><code>Public Shared Property DictionaryElement(ByVal Key As String) As Object
      Get
          If m_Dictionary.ContainsKey(Key) Then
              Return m_Dictionary(Key)
          Else
              Return [String].Empty
          End If
      End Get
      Set(ByVal value As Object)
          If m_Dictionary.ContainsKey(Key) Then
              m_Dictionary(Key) = value
          Else
              m_Dictionary.Add(Key, value)
          End If
  
      End Set
  End Property
  </code></pre>
  
  <p>Thanks</p>