I have the following code in a User Control:
public partial class MyControl : System.Web.UI.UserControl
{
public Enums.InformationSubCategory SubCategory { get; set; }
...omitted code
}
Enums.InformationSubCategory is an enum I have defined elsewhere, with the idea being that I can do this:
Example 1. <my:MyControl runat="server" SubCategory="Food" ...... />
Example 2. <my:MyControl runat="server" ...... />
If I don't specify a value at all for SubCategory, what will the value of SubCategory be in the code-behind for MyControl? Is it null or does a default value get applied to it? I noticed that with int properties, it defaults to zero.