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

  • Home
  • SEARCH
  • 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 6785249
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T17:06:14+00:00 2026-05-26T17:06:14+00:00

I was looking at someone else’s WCF service contract and noticed it was using

  • 0

I was looking at someone else’s WCF service contract and noticed it was using an out parameter:

client.SomeMethod(parameter1, parameter2, out someOutParameter);

Is there a good reason for having an out parameter instead of adding it to the response?

edit
This is what the proxy generated:

public string CreateItem(string contract, string note, out string warning)

Now if they needed to return a string and also have a warning, I have usually seen it like this:

public class CreateItemResponse
{
    public string Result { get; set; }
    public string Warning { get; set; }
}

I was just curious if there was a good reason for not doing it this way, and doing it with a string being returned and a string as an out parameter.

  • 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-26T17:06:15+00:00Added an answer on May 26, 2026 at 5:06 pm

    Is there a good reason for having an out parameter instead of adding it to the response?

    Not in a web service contract. Maybe laziness and unwillingness to define an additional data contract to be used as return type have been the driving forces behind this design decision. out, ref are .NET specific artifacts. A good and interoperable service contract shouldn’t rely on language specific artifacts.

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

Sidebar

Related Questions

I was looking at someone else's code and noticed they called 'release' on an
I am looking over someone Else's code and noticed that some of the user
I was looking at someone else's code and wondering why anyone would do it
I am looking at someone else's vba excel code. they are doing ReDim Preserve
I'm in the console, looking at someone else's app. I come across the following:
If I'm looking at someone else's rails app, what's the first place to look
I'm looking through someone else's code and am not sure what this means. It
I'm looking at someone else's Django registration templates and I see the line {%
Just learning php and looking into someone else's code. I'm not sure what is
I am looking over some code someone else did and I see this: if

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.