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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T03:52:10+00:00 2026-05-11T03:52:10+00:00

When using svcutil.exe, I noticed this switch, /tcv:Version35. The docs says this: Version35: Use

  • 0

When using svcutil.exe, I noticed this switch, /tcv:Version35. The docs says this:

Version35: Use /tcv:Version35 if you are generating code for clients that use .NET Framework 3.5. By using this value, the SvcUtil.exe tool generates code that references functionality in .NET Framework 3.5 and previous versions. When using /tcv:Version35 with the /async switch, both event-based and callback/delegate-based asynchronous methods are generated. In addition, support for LINQ-enabled DataSets and DateTimeOffset is enabled.

What is the difference between event-based and callback/delegate based async models?

EDIT: Is one way newer/better? I only get the BeginXXX and EndXXX methods when I don’t use the /tcv:Version35 switch. Silverlight uses XXXAsync which tells me I should use the event-based (XXXAsync) methods and use this switch.

  • 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. 2026-05-11T03:52:11+00:00Added an answer on May 11, 2026 at 3:52 am

    Let’s define a WCF service like this:

    namespace StackOverflow {     [ServiceContract]     public interface ITest     {         [OperationContract]         string GetName();     }      public class Test : ITest     {         public string GetName()         {             return 'Joel Spolsky';         }     } } 

    If you run svcutil on this, you’ll get the following client definition:

    public partial class TestClient : System.ServiceModel.ClientBase<ITest>, ITest {     // Other details elided...          public string GetData(int value)     {         return base.Channel.GetData(value);     } } 

    If you run svcutil again using the /async flag, you’ll get the following client definition:

    public partial class TestClient : System.ServiceModel.ClientBase<ITest>, ITest {     // Other details elided...      public event System.EventHandler<GetDataCompletedEventArgs> GetDataCompleted;      public string GetData(int value)     {         return base.Channel.GetData(value);     }      [EditorBrowsableAttribute(EditorBrowsableState.Advanced)]     public System.IAsyncResult BeginGetData(int value, System.AsyncCallback callback, object asyncState)     {         return base.Channel.BeginGetData(value, callback, asyncState);     }      [EditorBrowsableAttribute(EditorBrowsableState.Advanced)]     public string EndGetData(System.IAsyncResult result)     {         return base.Channel.EndGetData(result);     }      public void GetDataAsync(int value, object userState)     {         if ((this.onBeginGetDataDelegate == null))         {             this.onBeginGetDataDelegate = new BeginOperationDelegate(this.OnBeginGetData);         }         if ((this.onEndGetDataDelegate == null))         {             this.onEndGetDataDelegate = new EndOperationDelegate(this.OnEndGetData);         }         if ((this.onGetDataCompletedDelegate == null))         {             this.onGetDataCompletedDelegate = new System.Threading.SendOrPostCallback(this.OnGetDataCompleted);         }         base.InvokeAsync(this.onBeginGetDataDelegate, new object[] {value}, this.onEndGetDataDelegate, this.onGetDataCompletedDelegate, userState);     } } 

    So the /async flag simply provides a means for you to interact with your service asynchronously instead of the default synchronous-only behavior.

    The GetDataAsync() method invokes the GetData() method asynchronously and notifies you when it is complete via the GetDataCompleted event.

    The BeginGetData() and EndGetData() methods use the asynchronous behavior of delegates to invoke the GetData() method asynchronously. This is analogous to the BeginInvoke() and EndInvoke() methods on the System.Windows.Forms.Control class or the BeginRead() and EndRead() methods on the System.IO.Stream class.

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

Sidebar

Ask A Question

Stats

  • Questions 122k
  • Answers 122k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer Amongst other things, Mylyn allows you to fold/hide content and… May 12, 2026 at 12:50 am
  • Editorial Team
    Editorial Team added an answer MySQL offers a variety of database engines for a reason… May 12, 2026 at 12:50 am
  • Editorial Team
    Editorial Team added an answer After you exit BizSpark, you'll be required to acquire new… May 12, 2026 at 12:50 am

Related Questions

I'm protyping an application with WCF and I'm trying to define a Callback Contract
Sorry, but I am not sure what causes the problem, and the problem isn't
I encountered a problem when I tried to implement the ServiceKnownType example from MSDN.
I have a similar problem as this question . I have multiple web services

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.