Click here to Skip to main content
15,890,512 members
Home / Discussions / C#
   

C#

 
GeneralRe: Double vs Decimal Pin
DaveyM6919-Feb-08 9:38
professionalDaveyM6919-Feb-08 9:38 
GeneralRe: Double vs Decimal Pin
Vodstok19-Feb-08 12:22
Vodstok19-Feb-08 12:22 
QuestionHelp required please: Document Upload and Email Verification Pin
Freeweight19-Feb-08 7:14
Freeweight19-Feb-08 7:14 
GeneralRe: Help required please: Document Upload and Email Verification Pin
DaveyM6919-Feb-08 7:28
professionalDaveyM6919-Feb-08 7:28 
GeneralRe: Help required please: Document Upload and Email Verification Pin
Freeweight19-Feb-08 8:26
Freeweight19-Feb-08 8:26 
GeneralRe: Help required please: Document Upload and Email Verification Pin
Michael900019-Feb-08 8:52
Michael900019-Feb-08 8:52 
GeneralRe: Help required please: Document Upload and Email Verification Pin
Freeweight20-Feb-08 5:18
Freeweight20-Feb-08 5:18 
QuestionUsing xmlserialization to create an xml document...have a question [modified] Pin
LongRange.Shooter19-Feb-08 6:57
LongRange.Shooter19-Feb-08 6:57 
I'm taking data from a database and feeding it into an application that takes an XML file as input. One of their fields is basically an enumerator value so I created a class that would attach the attribute to the field:
    StaticType<int;> contractType;
    ...

[Serializable]
public class StaticType<T>
{
    public StaticType( ) { }
    public StaticType( T initialValue )
    {
        internalValue = initialValue;
        initialValue = index;
    }
    private T initialValue;
    private int initialIndex;
    [XmlAttribute(AttributeName="staticValue")]
    public T InternalValue
    {
        get { return initialValue; }
        set { initialValue = value; }
    }

}


The output works great and I get a field as such:
<someDataType staticValue="1" />

Here is the question:
Reading further into the documentation it looks like I might have to pass the value for some reason as well. So I'm puzzled as to how to construct the class so that my output gets created as:

<someDataType staticValue="1">some text value</someDataType>


Any ideas?

modified on Tuesday, February 19, 2008 1:17 PM

GeneralRe: Using xmlserialization to create an xml document...have a question Pin
Le centriste19-Feb-08 9:08
Le centriste19-Feb-08 9:08 
GeneralRe: Using xmlserialization to create an xml document...have a question Pin
LongRange.Shooter20-Feb-08 7:14
LongRange.Shooter20-Feb-08 7:14 
GeneralMaking Install Pin
Matjaz-xyz19-Feb-08 6:53
Matjaz-xyz19-Feb-08 6:53 
GeneralRe: Making Install Pin
Judah Gabriel Himango19-Feb-08 7:43
sponsorJudah Gabriel Himango19-Feb-08 7:43 
QuestionBackgroundWorker doesn't trigger ProgressChanged event Pin
Jayman36919-Feb-08 6:52
Jayman36919-Feb-08 6:52 
GeneralRe: BackgroundWorker doesn't trigger ProgressChanged event Pin
DaveyM6919-Feb-08 7:32
professionalDaveyM6919-Feb-08 7:32 
QuestionRe: BackgroundWorker doesn't trigger ProgressChanged event Pin
Jayman36919-Feb-08 7:51
Jayman36919-Feb-08 7:51 
GeneralRe: BackgroundWorker doesn't trigger ProgressChanged event Pin
DaveyM6919-Feb-08 9:34
professionalDaveyM6919-Feb-08 9:34 
QuestionRe: BackgroundWorker doesn't trigger ProgressChanged event Pin
Jayman36919-Feb-08 9:46
Jayman36919-Feb-08 9:46 
GeneralRe: BackgroundWorker doesn't trigger ProgressChanged event Pin
DaveyM6919-Feb-08 10:09
professionalDaveyM6919-Feb-08 10:09 
GeneralRe: BackgroundWorker doesn't trigger ProgressChanged event Pin
Scott Dorman21-Feb-08 5:17
professionalScott Dorman21-Feb-08 5:17 
Generalmasked textbox cursor Pin
NewToAspDotNet19-Feb-08 5:59
NewToAspDotNet19-Feb-08 5:59 
GeneralRe: masked textbox cursor Pin
Skippums19-Feb-08 6:30
Skippums19-Feb-08 6:30 
QuestionItems in ListView changed [modified] Pin
C-Scharbe19-Feb-08 5:16
C-Scharbe19-Feb-08 5:16 
GeneralRe: Items in ListView changed Pin
LongRange.Shooter19-Feb-08 7:17
LongRange.Shooter19-Feb-08 7:17 
GeneralRe: Items in ListView changed Pin
DaveyM6919-Feb-08 7:21
professionalDaveyM6919-Feb-08 7:21 
GeneralRe: Items in ListView changed Pin
C-Scharbe19-Feb-08 20:32
C-Scharbe19-Feb-08 20:32 

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.