C# Before Saving the data Validate each textbox

preview_player
Показать описание
Before Saving the data Validate each textbox, if empty give a message, in C# windows forms.
Рекомендации по теме
Комментарии
Автор

I thought there will be a shorter version of this because if there are 5 or more items to validate, validating with the "if' and "else if" statement that will be a really long code. If you know a different method for validating a bit larger number of text-boxes and other items, please share. I'm interested to know.​

cybermoongamer
Автор

You could use CASE instead of IF to shorten the code, but this way is fine too!

marianososa