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

  • Home
  • SEARCH
  • 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 6251207
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T13:34:17+00:00 2026-05-24T13:34:17+00:00

After reviewing this answer and given the extension method: public static bool IsIn<T>(this T

  • 0

After reviewing this answer and given the extension method:

public static bool IsIn<T>(this T source, params T[] list)
{
    if(null == source) throw new ArgumentNullException("source");
    return list.Contains(source);
}

What are your favorite extension methods for C#? (codeplex.com/extensionoverflow)

Is it better to write another extension method that would check if a variable is not in a list such as if(x.IsNotIn(1,2,3)) or is it better to just negate the first extension method such as if(!x.IsIn(1,2,3))?

  • 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-24T13:34:18+00:00Added an answer on May 24, 2026 at 1:34 pm

    I prefer negation of the positive case method. Why rewrite or clipboard inherit?

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

Sidebar

Related Questions

After reviewing this blog by Kirill Osenkov (How to create a generic List of
folks. I'm starting with CakePHP and after reviewing this tutorial ( http://book.cakephp.org/view/1543/Simple-Acl-controlled-Application ) and
After reading this question , I was reminded of when I was taught Java
OK, after reviewing some code with PMD and FindBugs code analyzers, i was able
Is it possible to partition based on char column? After reviewing the MySQL 5.1
After reviewing the related questions, none of them seem to address mine, so here
after months of tweaking my vimrc file and installing plugins, I have this little
Edit : After reviewing the play, the example I used below is a tad
I am reviewing this technology but have a few design concerns that made me
I recently start to learn CSS and table less design. After reviewing some tutorials

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.