Click here to Skip to main content
15,895,831 members
Articles / Programming Languages / C#

Writing your first WCF Service

Rate me:
Please Sign up or sign in to vote.
2.92/5 (21 votes)
28 Apr 20075 min read 127.1K   2.6K   53  
This article helps in writing the first WCF Service
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;

namespace SampleService
{
    [DataContract]
    public class Request
    {
        string name;

        [DataMember]
        public string Name
        {
            get { return name; }
            set { name = value; }
        }
    }

    [DataContract]
    public class Response
    {
        string message;

        [DataMember]
        public string Message
        {
            get { return message; }
            set { message = value; }
        }
    }
}

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Microsoft
India India
I'm working as a Consultant at Microsoft Global Services and like to spend my spare time investigating new stuff and write articles about the ones that are less discussed about. Please feel free to send your comments/suggestions/corrections on any of my work.

Comments and Discussions