Click here to Skip to main content
15,925,444 members
Home / Discussions / C#
   

C#

 
GeneralRe: How to wait for multiple STA threads to finish? Pin
SandeepN30-Aug-06 11:41
SandeepN30-Aug-06 11:41 
GeneralRe: How to wait for multiple STA threads to finish? Pin
SandeepN30-Aug-06 12:03
SandeepN30-Aug-06 12:03 
GeneralRe: How to wait for multiple STA threads to finish? Pin
Nader Elshehabi30-Aug-06 12:26
Nader Elshehabi30-Aug-06 12:26 
GeneralRe: How to wait for multiple STA threads to finish? Pin
SandeepN30-Aug-06 20:39
SandeepN30-Aug-06 20:39 
Questionhow to make a true copy of a reference-type object? Pin
michal.kreslik30-Aug-06 9:50
michal.kreslik30-Aug-06 9:50 
AnswerRe: how to make a true copy of a reference-type object? Pin
Nader Elshehabi30-Aug-06 10:12
Nader Elshehabi30-Aug-06 10:12 
GeneralRe: how to make a true copy of a reference-type object? Pin
michal.kreslik30-Aug-06 10:54
michal.kreslik30-Aug-06 10:54 
QuestionGenerics classes and object creation Pin
AndyHug30-Aug-06 8:31
AndyHug30-Aug-06 8:31 
At the moment I have the following classes :

Record ( which is the superclass )
- MessageHeaderRecord ( the superclass for the next classes ) :
- InfosRecord ( the class for the I tag
representing the informations from text )
- CommentRecord
- OrderRecord
- ResultsRecord
- TerminatorRecord

For each of this classes I have a corresponding class (MessageHeaderRecordFields ,...) in which I created the fields to put the infos from the file.

So far so good ...

MessageHeaderRecord beeing the superclass for the rest of classes I put inside of it a generic List :

private List m_Infos = new List()

internal List Infos
{
get
{
return m_Infos;
}
}

and the constructor is

internal MessageHeaderRecord()
{

RecordType = RecordType.MessageHeaderRecord;
m_Fields = new MessageHeaderRecordFields(); //

}

I did this because I want to access the objects as follows :


Message MyMessage = new Message();

MyMessage.Infos[3].Fields.SequenceNumber = "1";
MyMessage.Infos[3].Fields.InfoName.LastName = "John";

// Create a new info
int nInfoIndex = MyMessage.AddNewInformation(); (*1)
// Set the info specific data such as name, age, etc. for the info we just addded
MyMessage.Infos[nInfoIndex].Fields.InfoName.LastName = "John";

// Add an order record for this patient
int nOrderIndex = MyMessage.Infos[nInfoIndex].AddNewOrder(); (*2)

// Set the order specific information for the new order
MyMessage.Infos[nInfoIndex].Orders[nOrderIndex].Fields.OrderID = "11";

// Add a comment to this order
MyMessage.Infos[nInfoIndex].Orders[nOrderIndex].AddNewComment(); (*3)

// Set the text for the new comment
MyMessage.Infos[nInfoIndex].Orders [nOrderIndex].Commment.Fields.CommentText = "I am a comment.";

// Add a Result to this order
nResultIndex = MyMessage.Infos[nInfoIndex].Orders[nOrderIndex].AddNewResult();

// Set the new result's data
MyMessage.Infos[nPatientIndex].Orders[nOrderIndex].Results[nResultIndex].Fields.SequenceNumber = "333"; (*4)

So my problems redefined would be

(*1) - In which class to put the AddNewInformation() method

(*2) - In which class to put the Orders List and where to put the AddNewOrder() method

(*3) - In which class to put the Comment List and where to put the AddNewComment() method

(*4) - Same with Results List and AddNewResults() method


Please help me with this issues because I really cant figure them out.

Thank you in advance
AnswerRe: Generics classes and object creation Pin
Bruno M.T. Sousa30-Aug-06 10:30
Bruno M.T. Sousa30-Aug-06 10:30 
QuestionSockets or Remoting? Pin
mithrandiir4230-Aug-06 8:04
mithrandiir4230-Aug-06 8:04 
AnswerRe: Sockets or Remoting? Pin
Jun Du30-Aug-06 8:14
Jun Du30-Aug-06 8:14 
AnswerRe: Sockets or Remoting? Pin
Ista30-Aug-06 11:08
Ista30-Aug-06 11:08 
QuestionInserting a Null value in BLOB field in Oracle Pin
kalyanPaladugu30-Aug-06 7:51
kalyanPaladugu30-Aug-06 7:51 
AnswerRe: Inserting a Null value in BLOB field in Oracle Pin
mikone30-Aug-06 8:10
mikone30-Aug-06 8:10 
QuestionAssembly.createInstance contructor not found [modified] Pin
Walter Dias30-Aug-06 7:33
professionalWalter Dias30-Aug-06 7:33 
AnswerRe: Assembly.createInstance contructor not found Pin
Martin#30-Aug-06 9:48
Martin#30-Aug-06 9:48 
GeneralRe: Assembly.createInstance contructor not found Pin
Walter Dias30-Aug-06 10:56
professionalWalter Dias30-Aug-06 10:56 
QuestionGDI+ Serialization error Pin
theonewithtom30-Aug-06 6:58
theonewithtom30-Aug-06 6:58 
QuestionHelp - Serialization Problem Pin
Aaron Schaefer30-Aug-06 6:46
Aaron Schaefer30-Aug-06 6:46 
QuestionGDI+ & Calculation Problems. Pin
Gavin Roberts30-Aug-06 5:23
Gavin Roberts30-Aug-06 5:23 
AnswerRe: GDI+ & Calculation Problems. Pin
mikone30-Aug-06 5:39
mikone30-Aug-06 5:39 
GeneralRe: GDI+ & Calculation Problems. Pin
Gavin Roberts30-Aug-06 5:54
Gavin Roberts30-Aug-06 5:54 
GeneralRe: GDI+ & Calculation Problems. Pin
Gavin Roberts30-Aug-06 6:37
Gavin Roberts30-Aug-06 6:37 
GeneralRe: GDI+ & Calculation Problems. [modified] Pin
mikone30-Aug-06 7:41
mikone30-Aug-06 7:41 
QuestionAdd buttons to ControlBox? Pin
Vodstok30-Aug-06 5:05
Vodstok30-Aug-06 5:05 

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.