Click here to Skip to main content
15,892,805 members
Home / Discussions / C#
   

C#

 
GeneralRe: Fxcop Pin
RobCroll21-Jun-11 14:53
RobCroll21-Jun-11 14:53 
AnswerRe: Fxcop Pin
#realJSOP21-Jun-11 9:38
mve#realJSOP21-Jun-11 9:38 
AnswerRe: Fxcop Pin
Eddy Vluggen21-Jun-11 11:58
professionalEddy Vluggen21-Jun-11 11:58 
GeneralRe: Fxcop Pin
Subin Mavunkal21-Jun-11 21:04
Subin Mavunkal21-Jun-11 21:04 
AnswerRe: Fxcop Pin
Eddy Vluggen22-Jun-11 0:16
professionalEddy Vluggen22-Jun-11 0:16 
QuestionC# Working with C # classes from different namespaces Pin
lada_vyvojar20-Jun-11 20:17
lada_vyvojar20-Jun-11 20:17 
AnswerRe: C# Working with C # classes from different namespaces Pin
Vladimir Kniazkov20-Jun-11 20:38
professionalVladimir Kniazkov20-Jun-11 20:38 
AnswerRe: C# Working with C # classes from different namespaces Pin
BobJanova20-Jun-11 23:06
BobJanova20-Jun-11 23:06 
Firstly, take out common code and put that in base classes in a base interface, and make sure that each implementation implements a common namespace. The main driver code shouldn't have to store references to any of the specific company namespaces. Then the problem simply comes down to creating an instance of the main object within one of the namespaces.

Depending on how flexible you want your system to be, and whether you permit runtime plugins, you either want a hard-coded factory:
class MultiServiceFactory {
 IMultiService Create(string name){
  if(name == "01") return new Company.Service01.MultiService();
  else if(name == "02") return new Company.Service02.MultiService();
  // ... etc
  else throw new ArgumentException("Can't make a service for "+name);
 }
}


... or you need to use reflection to look up the requested name ("Company.Service"+name+".ClassName") in either the current assemblies or loaded runtime plugin assemblies. I won't go into the entirety of plugin architecture in a Q&A reply, there are plenty of articles on CP about it.
QuestionHow to add ToolBar in Slide Pin
Anubhava Dimri20-Jun-11 18:02
Anubhava Dimri20-Jun-11 18:02 
AnswerRe: How to add ToolBar in Slide Pin
ramzg20-Jun-11 23:54
ramzg20-Jun-11 23:54 
Question"Dictionary with int and Tuple" Or Separate Class? Pin
Matt U.20-Jun-11 12:49
Matt U.20-Jun-11 12:49 
AnswerRe: "Dictionary with int and Tuple" Or Separate Class? Pin
PIEBALDconsult20-Jun-11 12:54
mvePIEBALDconsult20-Jun-11 12:54 
GeneralRe: "Dictionary with int and Tuple" Or Separate Class? Pin
Matt U.20-Jun-11 12:57
Matt U.20-Jun-11 12:57 
GeneralRe: "Dictionary with int and Tuple" Or Separate Class? Pin
PIEBALDconsult20-Jun-11 13:40
mvePIEBALDconsult20-Jun-11 13:40 
GeneralRe: "Dictionary with int and Tuple" Or Separate Class? Pin
Matt U.20-Jun-11 13:44
Matt U.20-Jun-11 13:44 
GeneralRe: "Dictionary with int and Tuple" Or Separate Class? Pin
PIEBALDconsult20-Jun-11 13:53
mvePIEBALDconsult20-Jun-11 13:53 
GeneralRe: "Dictionary with int and Tuple" Or Separate Class? Pin
BobJanova20-Jun-11 23:00
BobJanova20-Jun-11 23:00 
QuestionWindows Form control property issue Pin
venomation20-Jun-11 9:25
venomation20-Jun-11 9:25 
AnswerRe: Windows Form control property issue Pin
Dave Kreskowiak20-Jun-11 11:29
mveDave Kreskowiak20-Jun-11 11:29 
GeneralRe: Windows Form control property issue Pin
venomation21-Jun-11 6:00
venomation21-Jun-11 6:00 
GeneralRe: Windows Form control property issue Pin
mahendren29-Jun-11 2:15
mahendren29-Jun-11 2:15 
QuestionMonthCalendar Usage Pin
dipuks20-Jun-11 6:19
dipuks20-Jun-11 6:19 
AnswerRe: MonthCalendar Usage Pin
PanchoM20-Jun-11 7:10
PanchoM20-Jun-11 7:10 
SuggestionRe: MonthCalendar Usage Pin
theanil20-Jun-11 7:20
theanil20-Jun-11 7:20 
QuestionSplashscreen with taskbar icon Pin
lukeer20-Jun-11 3:57
lukeer20-Jun-11 3:57 

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.