You can do it using else if
condition.
E.g.:
if(option1 && !option2)
{
//Option 1
}else if(!option1 && option2)
{
//option 2
}else if(option1 && option2)
{
//both
}
else
{
//no option
}
More Related Contents:
- Program * does not contain a static ‘Main’ method suitable for an entry point
- Return multiple values to a method caller
- How to get HttpClient to pass credentials along with the request?
- Binding a Button’s visibility to a bool value in ViewModel
- Wait Until File Is Completely Written
- What is the use of static variable in C#? When to use it? Why can’t I declare the static variable inside method?
- {” was not expected.} Deserializing Twitter XML
- C# “Parameter is not valid.” creating new bitmap
- How do I invert a colour?
- C# getting its own class name
- WPF Application that only has a tray icon
- No console output when using AllocConsole and target architecture x86
- In .NET/C# test if process has administrative privileges
- In C# what is the difference between a destructor and a Finalize method in a class?
- Best way to dynamically set an appender file path
- DateTime and CultureInfo
- [BotFramework]: How to capture/extract the values submitted through Adaptive card rendered in C# Web Chat bot in a waterfall dialog?
- ASP.NET Core JWT mapping role claims to ClaimsIdentity
- Record Video of Screen using .NET technologies [closed]
- Enable-Migrations Exception calling “SetData” with “2” argument(s)
- Save detached entity in Entity Framework 6
- Accessing properties through Generic type parameter
- What value should I pass into TimeZoneInfo.FindSystemTimeZoneById(String)?
- VS2010 – How to automatically stop compile on first compile error
- How do I inject ASP.NET 5 (vNext) user-secrets into my own utility class?
- How can I maintain ModelState with RedirectToAction?
- How to rotate image x degrees in c#?
- Prevent Winforms Designer from Generating Property Values for Inherited Controls
- How to merge two lists using LINQ?
- Detect if non DPI-aware application has been scaled/virtualized