I am working with VB.NET since a year ago, and now I have to work in another project with C#, and i cant find this equivalence..

In VB.NET

```
Dim dictionary As Dictionary(Of String, Decimal)
Dim oPerson As Person = Nothing
Dim key as string = "SomeValue"

If dictionary.ContainsKey(key) Then
oPerson = dictionary.Item(key)
End If

```

What is the best method to do this in C#??

I have found something like this, but i dont know if is the best method to do it..

```
Person oPerson = dictionary.Where(z => z.Key == key).FirstOrDefault().Val

```