KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I have the following class: public class Topic { public string Topic { get; set; } public string Description { get; set; } public int Count { get; set; } } I would like to have the Count always set to zero when the class is created with the following: var abc = new Topic { Topic = "test1", Description = "description1" } I am a bit confused with constructor. Is this possible or do I need to specify Topic, Description and Count when I create abc?
Tags (comma-separated)
Save Edits
Cancel