struct vs class in c#

I am little bit confused between when to use **struct** and when to use **class**. I know basically struct is ***value type*** and class is ***ref type***. So whenever you pass the value type to function it copies whole values to that local function memory and whenever pass objects of class to any function it just passes the reference of that object where all the value resides in memory. So I am looking for good example of where to use struct and class in terms of **performance optimization** and also **best programming practices**. Thanks for reviewing question.

Best Answer

Answers