Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
AnswerRe: Open File Dialog with Image Preview Pin
stancrm28-Jul-08 22:29
stancrm28-Jul-08 22:29 
GeneralRe: Open File Dialog with Image Preview Pin
Sukhjinder_K28-Jul-08 23:01
Sukhjinder_K28-Jul-08 23:01 
GeneralRe: Open File Dialog with Image Preview Pin
stancrm28-Jul-08 23:12
stancrm28-Jul-08 23:12 
QuestionDifferentt Typecasting for the same object Pin
SatyaVas28-Jul-08 20:26
SatyaVas28-Jul-08 20:26 
AnswerRe: Differentt Typecasting for the same object Pin
Super Lloyd28-Jul-08 20:31
Super Lloyd28-Jul-08 20:31 
AnswerRe: Differentt Typecasting for the same object Pin
Christian Flutcher28-Jul-08 20:32
Christian Flutcher28-Jul-08 20:32 
AnswerRe: Differentt Typecasting for the same object Pin
PIEBALDconsult29-Jul-08 13:58
mvePIEBALDconsult29-Jul-08 13:58 
QuestionHow do you maintain your connection/DAL in the object layer. [modified] Pin
Mycroft Holmes28-Jul-08 20:10
professionalMycroft Holmes28-Jul-08 20:10 
I have the usual layers UI, objects, DAL and SQL Server.

In VB I instantiate the DAL in the object layer using a friend variable in a module. This allows me to use the DAL in any class in the object layer without exposing the DAL to the UI. DAL stays alive as long as the app is in process.

Now C# does not have the module concept and I do not want to pass the DAL to the UI to pass to each class in the object layer. I assume it is done with a static class but I am struggling to get it just right.


[edit] What you can do is to create a public static variable on a class and use it like...
The only problem is static classes cannot have constructors, so can I declare the static class, pass values to a method that instantiates the static DAL? Then use the static DAL var in the other classes
[/edit]

Never underestimate the power of human stupidity
RAH

modified on Tuesday, July 29, 2008 2:17 AM

AnswerRe: How do you maintain your connection/DAL in the object layer. Pin
Christian Flutcher28-Jul-08 20:20
Christian Flutcher28-Jul-08 20:20 
GeneralRe: How do you maintain your connection/DAL in the object layer. Pin
Mycroft Holmes28-Jul-08 20:39
professionalMycroft Holmes28-Jul-08 20:39 
GeneralRe: How do you maintain your connection/DAL in the object layer. Pin
Mark Churchill29-Jul-08 15:51
Mark Churchill29-Jul-08 15:51 
QuestionWPf- Data Binding Problem Pin
topksharma198228-Jul-08 19:44
topksharma198228-Jul-08 19:44 
QuestionHow to find Versioning Information Pin
Mike Bentzen28-Jul-08 18:21
Mike Bentzen28-Jul-08 18:21 
AnswerRe: How to find Versioning Information Pin
Vasudevan Deepak Kumar28-Jul-08 18:36
Vasudevan Deepak Kumar28-Jul-08 18:36 
GeneralRe: How to find Versioning Information Pin
Mike Bentzen28-Jul-08 18:57
Mike Bentzen28-Jul-08 18:57 
GeneralRe: How to find Versioning Information Pin
Mike Bentzen28-Jul-08 19:01
Mike Bentzen28-Jul-08 19:01 
AnswerRe: How to find Versioning Information Pin
Luc Pattyn29-Jul-08 3:23
sitebuilderLuc Pattyn29-Jul-08 3:23 
Questionusing C# CodeDom to generate web service code Pin
AndieDu28-Jul-08 15:57
AndieDu28-Jul-08 15:57 
AnswerRe: using C# CodeDom to generate web service code Pin
Vasudevan Deepak Kumar28-Jul-08 18:37
Vasudevan Deepak Kumar28-Jul-08 18:37 
GeneralRe: using C# CodeDom to generate web service code Pin
AndieDu28-Jul-08 19:20
AndieDu28-Jul-08 19:20 
QuestionStatusStrip SQL Pin
nelsonpaixao28-Jul-08 14:04
nelsonpaixao28-Jul-08 14:04 
Question[Message Deleted] Pin
happy2day28-Jul-08 11:56
happy2day28-Jul-08 11:56 
AnswerRe: C# Programmers... Pin
Christian Graus28-Jul-08 12:48
protectorChristian Graus28-Jul-08 12:48 
GeneralRe: C# Programmers... Pin
happy2day28-Jul-08 12:56
happy2day28-Jul-08 12:56 
GeneralRe: C# Programmers... Pin
Paul Conrad28-Jul-08 17:49
professionalPaul Conrad28-Jul-08 17:49 

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.