Click here to Skip to main content
15,891,951 members
Home / Discussions / C#
   

C#

 
GeneralRe: WebService not returning Color Pin
Luc Pattyn25-Sep-10 17:44
sitebuilderLuc Pattyn25-Sep-10 17:44 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult25-Sep-10 17:52
mvePIEBALDconsult25-Sep-10 17:52 
GeneralRe: WebService not returning Color Pin
Luc Pattyn25-Sep-10 18:01
sitebuilderLuc Pattyn25-Sep-10 18:01 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult25-Sep-10 18:04
mvePIEBALDconsult25-Sep-10 18:04 
GeneralRe: WebService not returning Color Pin
Luc Pattyn25-Sep-10 18:10
sitebuilderLuc Pattyn25-Sep-10 18:10 
GeneralRe: WebService not returning Color [modified] Pin
PIEBALDconsult25-Sep-10 18:44
mvePIEBALDconsult25-Sep-10 18:44 
AnswerRe: WebService not returning Color Pin
AspDotNetDev25-Sep-10 21:35
protectorAspDotNetDev25-Sep-10 21:35 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult26-Sep-10 5:01
mvePIEBALDconsult26-Sep-10 5:01 
aspdotnetdev wrote:
as PIEBALD might say, implement


Correct, you're learning, grasshopper. Big Grin | :-D


Much of that is true, but the question remains of why MS chose to implement Color in such a way that it won't serialize/deserialize in some meaningful way.

As I demonstrated with my last experiment, the property that gets serialized/deserialized (colourstring) doesn't have to be public (because objects serialize/deserialize themselves). MS could implement Color with serialization as I did with my Colour class.



Edit:

Allow me to amend that. This being a (WCF) Web Service, the class that is generated for the proxy includes:

[System.Runtime.Serialization.DataMemberAttribute()]
public string colourstring
{
    get
    {
        return this.colourstringField;
    }
    set
    {
        this.colourstringField = value;
    }
}


So, although the property in the class I wrote is private, the property that gets deserialized is public.

Frown | :( Crap, that's no good... what genius came up with that idea?
AnswerRe: WebService not returning Color Pin
PIEBALDconsult26-Sep-10 7:31
mvePIEBALDconsult26-Sep-10 7:31 
GeneralRe: WebService not returning Color Pin
Luc Pattyn26-Sep-10 7:47
sitebuilderLuc Pattyn26-Sep-10 7:47 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult26-Sep-10 9:37
mvePIEBALDconsult26-Sep-10 9:37 
GeneralRe: WebService not returning Color Pin
Luc Pattyn26-Sep-10 9:48
sitebuilderLuc Pattyn26-Sep-10 9:48 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult26-Sep-10 10:10
mvePIEBALDconsult26-Sep-10 10:10 
GeneralRe: WebService not returning Color Pin
Luc Pattyn26-Sep-10 10:18
sitebuilderLuc Pattyn26-Sep-10 10:18 
GeneralRe: WebService not returning Color Pin
PIEBALDconsult26-Sep-10 12:41
mvePIEBALDconsult26-Sep-10 12:41 
AnswerRe: WebService not returning Color Pin
PIEBALDconsult27-Sep-10 16:26
mvePIEBALDconsult27-Sep-10 16:26 
GeneralRe: WebService not returning Color Pin
Luc Pattyn28-Sep-10 2:35
sitebuilderLuc Pattyn28-Sep-10 2:35 
Questionvisual studio addin - recalc dependencies before a build Pin
Jim Crafton24-Sep-10 9:21
Jim Crafton24-Sep-10 9:21 
QuestionRe: visual studio addin - recalc dependencies before a build Pin
AspDotNetDev24-Sep-10 11:04
protectorAspDotNetDev24-Sep-10 11:04 
Questionconnecting acces with udl file Pin
Erdinc2724-Sep-10 3:47
Erdinc2724-Sep-10 3:47 
AnswerRe: connecting acces with udl file Pin
PIEBALDconsult24-Sep-10 11:34
mvePIEBALDconsult24-Sep-10 11:34 
Questioncreating a pause? Pin
stephen.darling24-Sep-10 2:52
stephen.darling24-Sep-10 2:52 
AnswerRe: creating a pause? Pin
Manfred Rudolf Bihy24-Sep-10 3:04
professionalManfred Rudolf Bihy24-Sep-10 3:04 
GeneralRe: creating a pause? Pin
stephen.darling24-Sep-10 3:12
stephen.darling24-Sep-10 3:12 
GeneralRe: creating a pause? Pin
Manfred Rudolf Bihy24-Sep-10 3:25
professionalManfred Rudolf Bihy24-Sep-10 3:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.