TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
yoni m
1.7k
5
1.5k
collections generic with wcf
Jan 19 2013 7:26 PM
hi all
I want to pass generic collection, List
with wcf
how to do that ?
i tried [datamember] but it's don't work
this is my code
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.Serialization;
namespace BE
{
[DataContract]
public class BusinessAccount : Account
{
private string companyNumber;
private string companyName;
private List<string> authorizedSignatory = new List<string>();
public BusinessAccount() { }
public BusinessAccount(long number, int branchNumber, DateTime openingAccountDate, string password, int credit, int balance,
AccountStatus status, AccountType account_Type, string companyNumber, string companyName, List<string> authorizedSignatory)
: base(number,branchNumber,openingAccountDate,password,credit,balance,status,account_Type)
{
this.companyNumber = companyNumber;
this.companyName = companyName;
this.AuthorizedSignatory = authorizedSignatory;
}
[DataMember]
public string CompanyNumber
{
get { return companyNumber; }
set { companyNumber = value; }
}
[DataMember]
public string CompanyName
{
get { return companyName; }
set { companyName = value; }
}
[DataMember]
public List<string> AuthorizedSignatory
{
get { return authorizedSignatory; }
set
{
foreach (var item in value)
authorizedSignatory.Add(item);
}
}
}
}
Reply
Answers (
1
)
VS 2012 Compute Deployment Settings for Azure
WCF Service take XML string to parse into XML format