I have a Dictionary> and would like to expose the member as read only. I see that I can return it as a IReadOnlyDictionar
Dictionary>
IReadOnlyDictionar
https://msdn.microsoft.com/en-us/library/acdd6hb7.aspx
You can use this to expose the object as readonly.
You could also use properties get; set; and only allow the get to be public.
But Matias answer seems to be more fitting.