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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T06:13:53+00:00 2026-06-11T06:13:53+00:00

I have a method return void in a Web APP public static void doSomething(){

  • 0

I have a method return void in a Web APP

public static void doSomething(){
}

I like it become fire and forget by using async in c# 5.0, how?

Btw, if the void doSomethingQuick() is short-run method, whats the most resource saving method to fire and forget?

If the void doSomethingSlow() is a long-running method, whats the most resource saving method to fire and forget?

  • 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-06-11T06:13:54+00:00Added an answer on June 11, 2026 at 6:13 am

    There are three types of async methods:

    async void Foo()
    async Task Bar()
    async Task<T> Baz()
    

    Note that only the two last can be (a)waited on. Foo in this example is for fire and forget scenarios. You have to remember that async in this case is just an indicator that the method may itself use await. Hence you can declare async void doSomethingQuick() and async void doSomethingSlow(). Just because a method returns a task does not mean it executes on a seperate thread. It may return a completed task.

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

Sidebar

Related Questions

i have a method like this: public JObject Get(int id) { return new JObject(new
I have a web service that contains this method: [WebMethod] public static List<string> GetFileListOnWebServer()
I have a method on a WCF proxy which returns void. If the return
I have a method where I would like to return an object instance of
I'm developing an web app using asp.net mvc. I have a List in Cache
I have this method inside an Activity which implements an ImageLoader class: public void
I have a web project like: namespace Web { public partial class _Default :
I have a Silverlight web app using WCF and Membership.CreateUser to create new users.
I have the following method that returns void and I need to use it
Is it possible to have a method return different values depending on context (how

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.