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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T06:47:22+00:00 2026-06-18T06:47:22+00:00

I have added a very basic WCF Service to my windows phone application. When

  • 0

I have added a very basic WCF Service to my windows phone application. When hitting a button on the windows phone UI, I am calling _service.AddTwoNumbersAsync(1, 2);, which simply returns the answer in int.

I have a AddTwoNumbersCompleted event where I simply do MessageBox.Show(e.Result.ToString());

This works perfectly fine and the correct answer is returned.

My question is – in terms of best practices, is this the most standard way of calling a method in the service? Am I not calling it properly? Do I need to do OpenAsyn() for anything? Is this a safe way of calling the service?

  • 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-18T06:47:24+00:00Added an answer on June 18, 2026 at 6:47 am

    The way you are using it right now is the right way. You have a service client, calling the asynchronous method and binding to the callback event handler. There is really not much to it than this unless you will attempt to modify client configuration of use it synchronously.

    Be aware that by calling an async method you are switching thread contexts – that should be your main concern, if anything.

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

Sidebar

Related Questions

I have a task tracking application, which is very basic. It currently has a
I have a very simple xaml: (I only added a button to the basic
I have very strange issues in my application. I added a layout file with
I have (what should be) a very simple Windows Forms application. There is a
I have written a very basic crawler which scrapes product information from websites to
I have a very basic question about best practice of using try / catch
So I'm trying to achieve something seemingly very basic in jQuery. I have a
I have a webview with added javascript interface which works perfectly on most devices,
I have a very basic schema like this: Comments.yml: manyToOne: pages: targetEntity: Pages inversedBy:
I have a very basic JTree . As I am on a rush, I'd

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.