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 6750993
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T12:52:26+00:00 2026-05-26T12:52:26+00:00

i am learning extension method, a very handy feature, which can save number of

  • 0

i am learning extension method, a very handy feature, which can save number of hours of coding, provides reusability. what i’m doing now a days, daily i’m creating 10 extension methods which useful in day to day scenario. but i’m not getting how to use these extension methods, everytime we need to add dll and reference it. or is there any smart way where we can use .

suppose

 public static bool isValidMail(this string str)
        {
            Regex reg = new Regex(@"^[\w-\.]+@([\w-]+\.)+[\w-]{2,4}$");
            return reg.IsMatch(str);
        }

if i created 100 extension methods like this , then for every project should i need to reference this static class dll. as i work with multplie projects. is there any way that we can put these extension methods in centralized location or some assembly cache, where we can easily add using statement and get access to all static methods.

can we do like this ?

  1. whenever we do create new project, can VS automatically add the extensionmethods which we created, so that in evey project we can access it. rather than adding dll everytime

  2. i want to know how you people do.
    i hope no one down votes it, just curious abt implementation of extension methods

  • 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-26T12:52:26+00:00Added an answer on May 26, 2026 at 12:52 pm

    It sounds like you should have a single project containing related extension methods – and then yes, you’ll need to add a reference to that project from every project which needs it. That’s a one-time cost. You could put it in the GAC, but personally I wouldn’t – just treat it as another class library you need to depend on, like any other.

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

Sidebar

Related Questions

For learning and demonstrating, I need a macro which prints its parameter and evaluates
I am just learning F# and have been converting a library of C# extension
What are some resources for Linux developers learning OpenAL Effects Extension (EFX)? Creative's site
I have this extension method I created and it returns a string of all
I want to write an extension method for a collection of objects that uses
I am learning to write javascript and Chrome extensions. I want an extension that
I'm learning Python and writing a program that keeps track of the total number
I've just started learning Node.js and was very interested in its real-time capabilities, especially
I'm learning how to write a chrome extension. in most of the apis, there
Learning WPF nowadays. Found something new today with .Net dependency properties. What they bring

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.