Click here to Skip to main content
15,888,461 members
Home / Discussions / C#
   

C#

 
GeneralRe: Inherit an internal class to a public class Pin
OriginalGriff16-Aug-10 1:06
mveOriginalGriff16-Aug-10 1:06 
GeneralRe: Inherit an internal class to a public class Pin
Luc Pattyn16-Aug-10 1:14
sitebuilderLuc Pattyn16-Aug-10 1:14 
GeneralRe: Inherit an internal class to a public class Pin
OriginalGriff16-Aug-10 1:21
mveOriginalGriff16-Aug-10 1:21 
GeneralRe: Inherit an internal class to a public class Pin
Luc Pattyn16-Aug-10 1:24
sitebuilderLuc Pattyn16-Aug-10 1:24 
GeneralRe: Inherit an internal class to a public class Pin
dave.dolan16-Aug-10 9:05
dave.dolan16-Aug-10 9:05 
GeneralRe: Inherit an internal class to a public class Pin
OriginalGriff16-Aug-10 1:23
mveOriginalGriff16-Aug-10 1:23 
GeneralRe: Inherit an internal class to a public class Pin
Luc Pattyn16-Aug-10 1:28
sitebuilderLuc Pattyn16-Aug-10 1:28 
AnswerRe: Inherit an internal class to a public class Pin
Łukasz Nowakowski16-Aug-10 3:24
Łukasz Nowakowski16-Aug-10 3:24 
Internal class is visible only inside assembly. You can use it to implement functionality, that is required by your assembly, but shouldn't be accessible outside the assembly.
The real life example you say...

Let's say your application has an assembly for accessing database. You have classes with methods that perform some operations on database (insert, update, delete, select). Under the hood you use Entity Framework, but to assure, that database access is performed only with your classes, you set Entity Framework context class as internal. That provides you with cleaner code and strict separation of layers - higher layers don't know what mechanism you use for accessing database... and honestly, they shouldn't care.
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.

QuestionLearning Datasets... Pin
JollyMansArt15-Aug-10 10:28
JollyMansArt15-Aug-10 10:28 
AnswerRe: Learning Datasets... PinPopular
PIEBALDconsult15-Aug-10 11:04
mvePIEBALDconsult15-Aug-10 11:04 
GeneralRe: Learning Datasets... Pin
Dan Mos15-Aug-10 12:06
Dan Mos15-Aug-10 12:06 
QuestionRe: Learning Datasets... Pin
JollyMansArt15-Aug-10 15:14
JollyMansArt15-Aug-10 15:14 
AnswerRe: Learning Datasets... Pin
Luc Pattyn15-Aug-10 15:54
sitebuilderLuc Pattyn15-Aug-10 15:54 
GeneralRe: Learning Datasets... Pin
Keith Barrow15-Aug-10 12:20
professionalKeith Barrow15-Aug-10 12:20 
GeneralRe: Learning Datasets... Pin
Mycroft Holmes15-Aug-10 14:34
professionalMycroft Holmes15-Aug-10 14:34 
GeneralRe: Learning Datasets... Pin
PIEBALDconsult15-Aug-10 16:58
mvePIEBALDconsult15-Aug-10 16:58 
QuestionTargetInvocationException? Pin
Megidolaon15-Aug-10 8:13
Megidolaon15-Aug-10 8:13 
AnswerRe: TargetInvocationException? Pin
OriginalGriff15-Aug-10 8:26
mveOriginalGriff15-Aug-10 8:26 
GeneralRe: TargetInvocationException? Pin
Megidolaon16-Aug-10 3:29
Megidolaon16-Aug-10 3:29 
GeneralRe: TargetInvocationException? Pin
Alan N16-Aug-10 6:14
Alan N16-Aug-10 6:14 
GeneralRe: TargetInvocationException? [modified] Pin
Megidolaon16-Aug-10 15:40
Megidolaon16-Aug-10 15:40 
AnswerRe: TargetInvocationException? Pin
PIEBALDconsult15-Aug-10 8:28
mvePIEBALDconsult15-Aug-10 8:28 
AnswerRe: TargetInvocationException? Pin
Luc Pattyn15-Aug-10 8:41
sitebuilderLuc Pattyn15-Aug-10 8:41 
Question[Solved] UdpClient callback question [modified] Pin
AtomTech15-Aug-10 4:59
AtomTech15-Aug-10 4:59 
AnswerRe: UdpClient callback question Pin
Gary R. Wheeler15-Aug-10 5:22
Gary R. Wheeler15-Aug-10 5: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.