Questions tagged [datamember]
204 questions
0
votes
1 answer
Should I make an array a data member of an object? Or is there any other way to declare a member of an object multiple times?
I am making a transportation project. As there will be different types of buses with different number of seats. The seats will be either booked or not. I don't know whether I should make a boolean array of seats as data member of a class or should I…

Awais Korai
- 27
- 1
- 6
0
votes
2 answers
Wcf - Hiding Properties?
I've got a class which looks a little like this....
[DataContract]
public partial class Area : ModelBase
{
private String name;
private Guid floorId;
private Guid areaTypeId;
private int assetCount;
[DataMember]
public…

ETFairfax
- 3,794
- 8
- 40
- 58
0
votes
1 answer
Sending a SOAP request containing an empty namespace
I am trying to submit data through a SOAP request. The data received in the web service is null, presumably because the blank xmlns namespace in the XML that I am sending causes the the data to return null (e.g. the TransmissionVersion). Most of the…

nesco88
- 35
- 2
- 9
0
votes
0 answers
DataMember and DataContract
I am working on a project and I need to include [DataMember] and [DataContract] in my code but when I do that these attributs could not be found.
Is there a "Using" or a reference that I should include for these to work?
Thanks for you help!

RoyNasr
- 359
- 1
- 3
- 15
0
votes
2 answers
Check if actual null value was passed to a datamember in wcf
By default all the data member values in a parameter object to wcf service will be null. But how to check if actual null value was passed from the client to my service.
In otherwords if the client actually passed any values including null values to…

Prasad
- 1
- 1
0
votes
1 answer
What's the best way to get address difference between a class variable and the starting address of a class object?
Need to generate unique keys for the class data members. Hence I am thinking of getting the difference between the address of the variable minus the address of the class object. For example:
struct X {
int i; // &i - &X() = 0 (GCC)
double d; …

iammilind
- 68,093
- 33
- 169
- 336
0
votes
1 answer
Serialize Partial DataContract
I have a DataContract that looks like:
[DataContract(Name = User.Root, Namespace = "")]
public class RegisterUser
{
[DataMember(Name = User.EmailAddress)]
public string EmailAddress { get; set; }
[DataMember(Name =…

BabelFish
- 899
- 2
- 9
- 20
0
votes
0 answers
Using Enum in WCF Data Contracts
I am trying to create a WCF service with some enumerators exposed for clients to set certain properties on the class object. All enumerators associated with different Operations are put in a separate class.
What I understand after reading through…

thinkster
- 586
- 2
- 5
- 19
0
votes
0 answers
WCF Service return conditional object type
I have this controller
public ActionResult Retrieve()
{
ServiceResponse resp = service.GetModel();
if(resp.model == null)
{
return Json(resp.model);
}
return Json(new { Messages = resp.Messages, Data = respmodel, Stream =…

Intan
- 143
- 1
- 2
- 15
0
votes
2 answers
WCF object within DataContract
[Edit]: I added the TokenType enum, what caused the whole issue...
I have an issue using WCF and unfortunately I didn't find any useful help.
I am creating a WCF based application. When the server responds to the client's request, I want the send…

Gabor Varga
- 95
- 1
- 11
0
votes
0 answers
WCF DataContract,DataMember issue
I have following classes ,
DBConn for database connection ,
UserBL class for handle external user functionality ,
SpeakerVO class for handle the entity properties,
SpeakerBL class for handle the business layer methods,
ICustomerService for…

Sanjeewa
- 555
- 1
- 9
- 22
0
votes
2 answers
DataGridView.DataMember throws error when assigned a two-part name. i.e. Sales.StoreContact
My problem is outlined here: https://support.microsoft.com/kb/314043 Microsoft says: "This behavior is by design." and no workaround is provided.
I need a workaround.
I have a dataset which is populated correctly with the contents of the table name…

user323186
- 95
- 1
- 3
- 9
0
votes
0 answers
Why to use [Datacontract] and [DataMember] WCF?
Supposing that we have the following code for WCF service and a database with an Employee table.
Why use [DataContract] and what are benefits of using all [DataMember] ?
We can use all Employee details without using…

BMA
- 33
- 6
0
votes
3 answers
Combining Two Files, Invalid use of nonstatic data member
#include
#include
class DVD {
public:
char m_strTitle[25];
int m_nYearOfRelease;
char m_strGenre[25];
char m_strRentalStatus[50];
}
void Print()
{
using namespace std;
cout << "Title" << DVD::m_strTitle…

Scott Glendenning
- 29
- 1
0
votes
3 answers
ArgumentException was unhandled Application.run
Hi I've been through many sites and can't seem to find an answer.
I modified a view that was connected to a Datagridview connected through a tableadapter on a C# Winforms app and in order to "reconnect" I had to delete the tableadapter and reconnect…

user369758
- 1
- 1