Click here to Skip to main content
15,887,944 members
Home / Discussions / C#
   

C#

 
QuestionHelp writing a program which adds up values in a 2D array to determine if it is a magic square Pin
Member 1052812320-Jan-14 3:43
Member 1052812320-Jan-14 3:43 
AnswerRe: Help writing a program which adds up values in a 2D array to determine if it is a magic square Pin
Peter Leow20-Jan-14 4:20
professionalPeter Leow20-Jan-14 4:20 
AnswerRe: Help writing a program which adds up values in a 2D array to determine if it is a magic square Pin
OriginalGriff20-Jan-14 5:50
mveOriginalGriff20-Jan-14 5:50 
AnswerRe: Help writing a program which adds up values in a 2D array to determine if it is a magic square Pin
BillWoodruff20-Jan-14 9:08
professionalBillWoodruff20-Jan-14 9:08 
QuestionCustom Data Types Pin
sunsilk1020-Jan-14 3:04
sunsilk1020-Jan-14 3:04 
AnswerRe: Custom Data Types Pin
Manfred Rudolf Bihy20-Jan-14 3:25
professionalManfred Rudolf Bihy20-Jan-14 3:25 
AnswerRe: Custom Data Types Pin
BillWoodruff20-Jan-14 5:13
professionalBillWoodruff20-Jan-14 5:13 
AnswerRe: Custom Data Types Pin
Freak3020-Jan-14 23:30
Freak3020-Jan-14 23:30 
Depending on what the lists contain (any common data members) and what you need to do to them, you might consider using a common base class or an interface. You would then have 5 lists of that base class or interface and pass each one to the same function. As long as you only need to execute common functionality for all lists it should work.

If you need special functionality for some ofthe lists, you could either insert an if like
C#
if (item is listtables1)
{
    listtables1 tmp = (listtables1) item;
    // execute special table 1 functionality here
}

into the common function.

Or you use a different approach: You keep the lists of the special types and create a special function for each type that needs special handling. Then you can call the common function from the special functions passing the base class/interface of the current item. Or you call the common function directly in a loop for the classes without special handling.
The good thing about pessimism is, that you are always either right or pleasently surprised.

QuestionC# with Oraclei Pin
Nightbird.14319-Jan-14 21:00
Nightbird.14319-Jan-14 21:00 
AnswerRe: C# with Oraclei Pin
V.19-Jan-14 21:49
professionalV.19-Jan-14 21:49 
QuestionMulti Desktop app, Need to take Screen short of a given desktop using handle. Pin
ptr_Electron19-Jan-14 19:23
ptr_Electron19-Jan-14 19:23 
AnswerRe: Multi Desktop app, Need to take Screen short of a given desktop using handle. Pin
Mycroft Holmes19-Jan-14 21:02
professionalMycroft Holmes19-Jan-14 21:02 
GeneralRe: Multi Desktop app, Need to take Screen short of a given desktop using handle. Pin
ptr_Electron20-Jan-14 0:40
ptr_Electron20-Jan-14 0:40 
AnswerRe: Multi Desktop app, Need to take Screen short of a given desktop using handle. Pin
Bernhard Hiller20-Jan-14 3:47
Bernhard Hiller20-Jan-14 3:47 
GeneralRe: Multi Desktop app, Need to take Screen short of a given desktop using handle. Pin
ptr_Electron20-Jan-14 7:11
ptr_Electron20-Jan-14 7:11 
QuestionSuggestion required for Accounting Software core infrastructure VS2010 C# MySql Pin
ahmed_one19-Jan-14 18:48
ahmed_one19-Jan-14 18:48 
AnswerRe: Suggestion required for Accounting Software core infrastructure VS2010 C# MySql Pin
Mycroft Holmes19-Jan-14 20:57
professionalMycroft Holmes19-Jan-14 20:57 
GeneralRe: Suggestion required for Accounting Software core infrastructure VS2010 C# MySql Pin
ahmed_one19-Jan-14 21:11
ahmed_one19-Jan-14 21:11 
GeneralRe: Suggestion required for Accounting Software core infrastructure VS2010 C# MySql Pin
Trak4Net20-Jan-14 9:01
Trak4Net20-Jan-14 9:01 
GeneralRe: Suggestion required for Accounting Software core infrastructure VS2010 C# MySql Pin
ahmed_one20-Jan-14 17:05
ahmed_one20-Jan-14 17:05 
Questioncreate and use .DLL Pin
DrooBo19-Jan-14 6:28
DrooBo19-Jan-14 6:28 
SuggestionRe: create and use .DLL Pin
Richard MacCutchan19-Jan-14 6:52
mveRichard MacCutchan19-Jan-14 6:52 
AnswerRe: create and use .DLL Pin
Dave Kreskowiak19-Jan-14 6:57
mveDave Kreskowiak19-Jan-14 6:57 
AnswerRe: create and use .DLL Pin
DrooBo19-Jan-14 7:30
DrooBo19-Jan-14 7:30 
GeneralRe: create and use .DLL Pin
Dave Kreskowiak19-Jan-14 10:22
mveDave Kreskowiak19-Jan-14 10:22 

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.