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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T18:47:32+00:00 2026-05-17T18:47:32+00:00

I am working with Asp.NET and I have a class named PathFinder which has

  • 0

I am working with Asp.NET and I have a class named PathFinder which has methods like StyleBarPath(string BrandId,string ProductId) which returns for example a combination of path including brandId and productId and also there are such methods in the same class.

What I am thinking to make them static methods to invoke them easily in every where by saying PathFinder.StylePath("1","2"); to use the returned values inside a <a href=""></a> user control.

But since I am working too much these days, what I know is getting complicated for some reasons. Anyways, here is my question :

Since I am using inline coding on a lot of places like <a href='<%=PathFinder.StylePath("1","2")%>'></a>, I don’t want to create a lot of instances by doing this <a href='<%=new PathFinder().StylePath("1","2")%>'></a> by declaring the methods not-static.

But I am afraid of changing the methods returns values because defining the methods static. I mean when a client calls this method, it wouldn’t affect the other clients who invoke the same method at the same time?

They would have different call stacks right?

Lets say :

  • client one invokes the method with these parameters — {brandId:2,productId:3}
  • client tow invokes the method with these parameters — {brandId:3,productId:4}

This actions happens near the same time when the server processing their requests. What I want to learn is whether the invocations affect each others and change the returning values of each other since they are defined static.

Thanks for reading so far and being a helper 🙂

I just don’t want the clients see path/1/2/ while they are waiting for path/2/3/

Some Notes about the question :

  • Is it the same for static fields?
  • 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-17T18:47:33+00:00Added an answer on May 17, 2026 at 6:47 pm

    You can call a static method safely from multiple threads simultaneously and at separate times given the following:

    • The static method does not access variables outside of itself, or those variables are also thread safe.
    • The static method does not create side effects which are not thread safe.

    If your method is what it looks like it is, you’re simply taking some inputs adjusting them and returning the result without accessing anything outside of the function. That would be completely safe.

    Static fields are not the same as methods at all. It is one copy of a variable. Any changes to that static field will affect everything else that uses it.

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

Sidebar

Related Questions

I have created a Web Application in asp.net 2.0. which is working fine on
I'm working on an asp.net MVC application. I have a class that wraps a
I am working on a project which adopted ASP.NET MVC3(Razor) tech. Now, I have
I am working on an asp.net application and I have created a folder named
I'm working on an ASP.NET page, using VB.NET and I have this hierarchy: Page
I am working with ASP.NET doing some client side javascript. I have the following
On a recent project I have been working on in C#/ASP.NET I have some
I am working on a web app using C# and asp.net I have been
I am working on a ASP.NET app and i have a need to post
I'm working on an asp.net web site. We have to use com interop to

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.