Horje
c# check number is odd or even Code Example
check if number is even or odd c#
int i = 5;
if (i % 2 == 0)
{
	// even
}
else
{
	// odd
}
c# check number is odd or even
    static int counter = 0;
    public int maxstrairs = 100;
    
    void Start()
    {
        counter++;
        if(counter < maxstrairs)
        {
            dothestairs();
        }

    }

    private void dothestairs()
    {
        if (counter % 2 == 0)
        {
            // even
        }
        else
        {
           // odd
        }
    }




Csharp

Related
SonarQube UnitTests Code Example SonarQube UnitTests Code Example
online embedded c compiler Code Example online embedded c compiler Code Example
HttpClient .net Core add Certificate Code Example HttpClient .net Core add Certificate Code Example
does Registry.CurrentUser.OpenSubKey create the key if it does not exist? Code Example does Registry.CurrentUser.OpenSubKey create the key if it does not exist? Code Example
how to pass function as paraemter of another function pythpn Code Example how to pass function as paraemter of another function pythpn Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
9