There is a smarter way of avoiding null values in string assignment. Many of us use Ternary, Format etc. to handle this.
string studentHobbies = (txtHobbies.Text != null) ? txtHobbies.Text : string.Empty;
string studentHobbies = txtHobbies.Text ?? string.Empty;

Join the conversation! Your thoughts help the community grow.