Validate object properties

Ronald Rex 61 Reputation points

I have objects that I am adding to a list of Interface items. My properties on my objects are strings. I was wondeing how do I make sure that my properties have values? Thanks !!!

public class Pizza 
   public string pizzaSize {get;set;}
   public string pizzaType {get;set;}
   public string sauceType {get;set;}

public static List<IMenuItem> items=new List<IMenuItem>();
A Microsoft open-source framework for building native device applications spanning mobile, tablet, and desktop.
902 questions
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
7,004 questions
{count} votes