25 lines
566 B
C#
Raw Normal View History

2023-09-21 17:03:20 +04:00
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CustomComponents.Exceptions
{
public class ContentException : Exception
{
public ContentException(bool state) : base(CustomMessage(state)){ }
private static string CustomMessage(bool state)
{
if(state)
{
return "TextBox is empty however null flag is checked.";
}
return "TextBox is empty. You better write something!";
}
}
}