Click here to Skip to main content
15,908,909 members
Home / Discussions / C#
   

C#

 
AnswerRe: start the timer Pin
Luc Pattyn18-Jul-12 10:48
sitebuilderLuc Pattyn18-Jul-12 10:48 
Questionhierarchical data in datagrid wpf(treegrid) Pin
algoram18-Jul-12 5:43
algoram18-Jul-12 5:43 
AnswerRe: hierarchical data in datagrid wpf(treegrid) Pin
Dave Kreskowiak18-Jul-12 8:56
mveDave Kreskowiak18-Jul-12 8:56 
QuestionError 1 The modifier 'abstract' is not valid for this item Pin
RaoulICT17-Jul-12 18:17
RaoulICT17-Jul-12 18:17 
AnswerRe: Error 1 The modifier 'abstract' is not valid for this item Pin
Trak4Net17-Jul-12 19:09
Trak4Net17-Jul-12 19:09 
GeneralRe: Error 1 The modifier 'abstract' is not valid for this item Pin
RaoulICT17-Jul-12 19:26
RaoulICT17-Jul-12 19:26 
GeneralRe: Error 1 The modifier 'abstract' is not valid for this item Pin
Trak4Net17-Jul-12 19:31
Trak4Net17-Jul-12 19:31 
AnswerRe: Error 1 The modifier 'abstract' is not valid for this item Pin
BobJanova18-Jul-12 3:46
BobJanova18-Jul-12 3:46 
GeneralRe: Error 1 The modifier 'abstract' is not valid for this item Pin
PIEBALDconsult18-Jul-12 4:22
mvePIEBALDconsult18-Jul-12 4:22 
AnswerRe: Error 1 The modifier 'abstract' is not valid for this item Pin
Luc Pattyn18-Jul-12 6:49
sitebuilderLuc Pattyn18-Jul-12 6:49 
QuestionUser Authenticattion Pin
harrypsd17-Jul-12 10:01
harrypsd17-Jul-12 10:01 
AnswerRe: User Authenticattion Pin
Bernhard Hiller17-Jul-12 20:31
Bernhard Hiller17-Jul-12 20:31 
AnswerRe: User Authenticattion Pin
_Amy17-Jul-12 20:53
professional_Amy17-Jul-12 20:53 
AnswerRe: User Authenticattion Pin
Eddy Vluggen18-Jul-12 1:11
professionalEddy Vluggen18-Jul-12 1:11 
QuestionCreating Minidumps After Error Pin
Richard Andrew x6417-Jul-12 9:57
professionalRichard Andrew x6417-Jul-12 9:57 
AnswerRe: Creating Minidumps After Error Pin
Eddy Vluggen17-Jul-12 11:19
professionalEddy Vluggen17-Jul-12 11:19 
GeneralRe: Creating Minidumps After Error Pin
Richard Andrew x6417-Jul-12 12:29
professionalRichard Andrew x6417-Jul-12 12:29 
Questioninsert data from Oracle to MS SQL Pin
Ubun2OS17-Jul-12 5:57
Ubun2OS17-Jul-12 5:57 
AnswerRe: insert data from Oracle to MS SQL Pin
Pete O'Hanlon17-Jul-12 6:09
mvePete O'Hanlon17-Jul-12 6:09 
GeneralRe: insert data from Oracle to MS SQL Pin
PIEBALDconsult17-Jul-12 6:41
mvePIEBALDconsult17-Jul-12 6:41 
GeneralRe: insert data from Oracle to MS SQL Pin
Pete O'Hanlon17-Jul-12 8:07
mvePete O'Hanlon17-Jul-12 8:07 
GeneralRe: insert data from Oracle to MS SQL Pin
PIEBALDconsult17-Jul-12 9:27
mvePIEBALDconsult17-Jul-12 9:27 
QuestionCreating subobjects within an object? Pin
Goalie3517-Jul-12 5:43
Goalie3517-Jul-12 5:43 
AnswerRe: Creating subobjects within an object? Pin
Luc Pattyn17-Jul-12 6:40
sitebuilderLuc Pattyn17-Jul-12 6:40 
You can define your own Status type (class or struct). It could have whatever public fields (or better properties) you like.

You would instantiate such type like any other. Maybe so:
public Status RunReport() {
   ...
   Status status=new Status(true);
   return status;
}


However, seeing you are thinking "Exception", why not use real exceptions, i.e. return results when all goes well, and throw an Exception when something goes wrong, so the caller can catch that Exception?

Goalie35 wrote:
Status.Exception (boolean)

Status.Exception.Message (string)

That is not possible. Either Exception is a boolean and it hasn't subfields; or it is a composite type (with fields/properties Message, StackTrace, etc.) and then it doesn't have an overall boolean value.


I would suggest you return to your C# book and read the chapters on classes, and Exceptions.

Smile | :)
Luc Pattyn [My Articles] Nil Volentibus Arduum

GeneralRe: Creating subobjects within an object? Pin
BobJanova18-Jul-12 4:38
BobJanova18-Jul-12 4:38 

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.