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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T20:40:52+00:00 2026-05-26T20:40:52+00:00

I am using WCF service I have a Data Contract: [DataContract] [KnownType(typeof(CustomBranches))] public class

  • 0

I am using WCF service

I have a Data Contract:

[DataContract]
[KnownType(typeof(CustomBranches))]
public class CustomBranches
{
    [DataMember]
    public int Id { get; set; }

    [DataMember]
    public string branch_name { get; set; }

    [DataMember]
    public string address_line_1 { get; set; }

    [DataMember]
    public string city_name { get; set; }
}

Is it possible that i can find the name of all the DataMembers in this class CustomBranches

Like “ID” , “branch name” etc

Thanks

  • 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-26T20:40:53+00:00Added an answer on May 26, 2026 at 8:40 pm

    Seeing as it’s a data-contract you should most likely have all these properties available, but if not the following should list all properties of your type:

    Type T =(typeof(T));
    var properties = T.GetProperties(BindingFlags.Public|BindingFlags.Instance);
    

    replace T with the type, and you’re good to go. Depending on your needs you might want different BindingFlags.

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

Sidebar

Related Questions

My AJAX-enabled WCF service returns JSON using this contract, [DataContract] public class JQGridContract {
I have a Data Service created using WCF that internally uses nHibernate. This WCF
I have a WCF Service Library (implemented using NH) with one of the class
I have this code in my WCF Service: public class MyImage { public Image
I have a WCF service operation that accepts a data contract parameter of custom
HI, Am using wcf service with silverlight and my datacontract class is exposed in
I have WCF restful service and have property called Image with Imageclass [DataMember] public
I have developed a Web service using WCF Service Application. This service application is
I have a WCF service that is using a custom ServiceAuthorizationManager . The custom
I have a .NET web service (using asmx...have not upgraded to WCF yet) that

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.