---
title: "Multiple Conditions in If Statement or Splitting using C#"  
description: "Multiple Conditions in If Statement or Splitting using C#"  
author: "Anonymous User"  
published: 2013-10-14  
updated: 2013-10-14  
canonical: https://www.mindstick.com/forum/1667/multiple-conditions-in-if-statement-or-splitting-using-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# Multiple Conditions in If Statement or Splitting using C#

when i am using if statements with [multiple](https://www.mindstick.com/blog/12797/iowa-is-expected-to-see-heavy-growth-in-multiple-sectors) [conditions](https://www.mindstick.com/blog/394/javascript-if-else), how are they [managed](https://www.mindstick.com/forum/33928/what-is-managed-or-unmanaged-code-in-c-sharp) in the [compiler](https://www.mindstick.com/articles/27/just-in-time-compiler)?

A) Will it ignore the [second](https://answers.mindstick.com/qa/41761/how-did-the-second-industrial-revolution-influence-women-s-roles-in-society) Statement, if the first statement is not fulfilled or vice versa?

```
If(time > 3.0 && hitEnabled)
```

B) Late Defintions are [often](https://answers.mindstick.com/qa/115859/how-do-i-resolve-the-we-limit-how-often-you-can-do-certain-things-error) recommended, so should i prefere to use one [condition](https://www.mindstick.com/forum/12711/select-query-with-and-condition) in if statements?

```
if(time > 3.0)
    if(hitEnabled)
```

Thanks!

## Replies

### Reply by Anonymous User

```
String someString = null;

        if (someString != null && someString[4].Equals('a'))
        {
            //// not called
        }

        if (someString != null || someString[4].Equals('a'))
        {
            //// exception
        }

        Console.ReadLine();
```


---

Original Source: https://www.mindstick.com/forum/1667/multiple-conditions-in-if-statement-or-splitting-using-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
