Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 4036870
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T12:16:36+00:00 2026-05-20T12:16:36+00:00

Is there a (preferred free) tool that can analyze how many different combinations are

  • 0

Is there a (preferred free) tool that can analyze how many different combinations are possible in a method? I am currently refactoring a method that has many many if/switch statments and I am curious how many possible different execution ways this method had.

Let’s say I have a simple method:

public void DoSomething(bool flag1, int value)
{

    if (flag1)
    {
        if (value > 0)
        {
            Console.WriteLine("Flag1 & value > 0");
            return;
        }
        else
        {
            Console.WriteLine("Flag1 & value <= 0");
            return;
        }
    }
    elseif (value > 0 and value < 10)
    {
        Console.WriteLine("Flag1 is false and value between 0 & 10");
        return;
    }

    if (value < 0)
    {
        Console.WriteLine("Flag1 = false & value <= 0");
        return;
    }
    elseif(value = 0)
    {
        Console.WriteLine("Flag1 = false & value >= 10");
        return;
    }

    Console.WriteLine("nothing else matched");

}

there should be 6 possible ways in which the this method could be executed.
I know there are tools out there that can calculate this number for me (I believe Visual Studio Ultimate can do this but unfortunately I only own a Professional version).

Maybe someone knows a good tool, that can do this.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-20T12:16:37+00:00Added an answer on May 20, 2026 at 12:16 pm

    CodeMetrics is a free add-on for the soon no-longer-free Reflector. No idea how good it is, I got the right version of VS.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Which method is preferred? Session.Remove(foo); Session[foo] = null; Is there a difference?
What is the preferred free open source project management and SCM tool combination for
Is there a pythonic preferred way to do this that I would do in
Is there a preferred way to handle animation when using Flex -- For instance,
Is there a preferred way to return multiple values from a C++ function? For
There is a conversion process that is needed when migrating Visual Studio 2005 web
There seem to be many ways to define singletons in Python. Is there a
There are many, many, many options out there, but I still couldn't settle with
Is there such a thing as having the most prefered design pattern for building
There are two weird operators in C#: the true operator the false operator If

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.