Question: How do you define a getter and setter for complex data types such as a dictionary?

```
public Dictionary<string, string> Users
{
    get
    {
        return m_Users;
    }

    set
    {
        m_Users = value;
    }
}

```

This returns the entire dictionary? Can you write the setter to look and see if a specific key-value pair exists and then if it doesn't, add it. Else update the current key value pair? For the get, can you return a specific key-value pair instead of the whole dictionary?

Answer: 
You won't be able to do that with a property. You'll need to use methods for that, or add an indexer to your class. The `get` method can't accept a parameter (the key).

Another option, if you want someone to be able to easily add/remove keys to the dictionary but prevent them from setting an entirely new one would be to make the property a read-only property that returns a dictionary created in the constructor. It would be less flexible then adding get/set methods, but in common, simple cases it can do just fine.
```
Dictionary<string, string> param = new Dictionary<string, string>();

public void SetYourParameter(string parametrName, string paramValue)
{
    param[parametrName] = paramValue;            
}

public string GetYourParameter(string parametrName)
{
    // ContainKey ---> It returns value if the key was found
    if( param.ContainsKey(parametrName))
        return param[parametrName];
    else
        return null;
}

```