© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
30 replies
SWEETPONY

✅ Is it possible to lock method by id?

I don't know how to write correct question but I would try to describe my idea. Let's say I have this method:
public async Task<Dto> Modify(string groupId) => ..
public async Task<Dto> Modify(string groupId) => ..

Imagine there are 4 people inside 1 group and someone called
Modify
Modify
method. Modification was started, it takes 1 minute for example and someone from this group called
Modify
Modify
method again.

I want to deny the second user to use
Modify
Modify
method because first user didn't get the response. How can I do it?
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

Is it possible to remove predicate by condition?
C#CC# / help
3y ago
❔ ✅ is it possible to ''lock'' a var after the first assignment?
C#CC# / help
4y ago
Is it possible to access windows objects in a static method?
C#CC# / help
3y ago