Click here to Skip to main content
15,891,763 members
Home / Discussions / C#
   

C#

 
GeneralRe: Invalid expression term 'uint' Pin
mbah obiora15-May-22 1:54
mbah obiora15-May-22 1:54 
GeneralRe: Invalid expression term 'uint' Pin
OriginalGriff15-May-22 2:05
mveOriginalGriff15-May-22 2:05 
QuestionParse complex numbers from string Pin
Member 1563407112-May-22 8:28
Member 1563407112-May-22 8:28 
AnswerRe: Parse complex numbers from string Pin
OriginalGriff12-May-22 9:42
mveOriginalGriff12-May-22 9:42 
AnswerRe: Parse complex numbers from string Pin
jsc4213-May-22 0:13
professionaljsc4213-May-22 0:13 
GeneralRe: Parse complex numbers from string Pin
Member 1563407116-May-22 8:02
Member 1563407116-May-22 8:02 
GeneralRe: Parse complex numbers from string Pin
jsc4217-May-22 3:19
professionaljsc4217-May-22 3:19 
GeneralRe: Parse complex numbers from string Pin
Richard Deeming17-May-22 3:26
mveRichard Deeming17-May-22 3:26 
GeneralRe: Parse complex numbers from string Pin
jsc4217-May-22 5:05
professionaljsc4217-May-22 5:05 
GeneralRe: Parse complex numbers from string Pin
jsc4217-May-22 22:16
professionaljsc4217-May-22 22:16 
Question"interface hack" to make private nested class instances available to outer class methods ? Pin
BillWoodruff11-May-22 1:25
professionalBillWoodruff11-May-22 1:25 
AnswerRe: "interface hack" to make private nested class instances available to outer class methods ? Pin
OriginalGriff11-May-22 2:15
mveOriginalGriff11-May-22 2:15 
GeneralRe: "interface hack" to make private nested class instances available to outer class methods ? Pin
BillWoodruff11-May-22 3:29
professionalBillWoodruff11-May-22 3:29 
GeneralRe: "interface hack" to make private nested class instances available to outer class methods ? Pin
Richard Deeming11-May-22 6:16
mveRichard Deeming11-May-22 6:16 
GeneralRe: "interface hack" to make private nested class instances available to outer class methods ? Pin
BillWoodruff11-May-22 17:20
professionalBillWoodruff11-May-22 17:20 
GeneralRe: "interface hack" to make private nested class instances available to outer class methods ? Pin
Richard Deeming11-May-22 21:37
mveRichard Deeming11-May-22 21:37 
GeneralRe: "interface hack" to make private nested class instances available to outer class methods ? Pin
BillWoodruff11-May-22 23:33
professionalBillWoodruff11-May-22 23:33 
Richard Deeming wrote:
The AddSomething and GetSomething methods depend on the interface, not the unused nested class.
Hi, Thanks for looking further into the code !

You are correct that the class definition for 'ISomething1 is not used in the use-case example (it's a fossil from an earlier version), and I will delete that from the code posted here, thanks ! Sorry for any confusion that added.

Those two methods, by design, can only be accessed via an instance of 'OuterClass; while they use the public Interface, I don't see them as "dependent" in the usual sense of that term.

My hypothesis here is limited in scope: does this technique contribute to the encapsulation of the collections of Instances in the outer class that implement the Interface.

This code example is, by design, a terse example.

I also use generics in a way not shown in this example ... imho, does not need to be shown.

The "big picture," imho, is:

1) if you are managing collections of mixed Types (which requires use of Interface), where extensibility ... the user can create new Types that use the Interface ... is important ...

2) and, you want maximum encapsulation of those collections

3) what are good techniques ?

cheers, Bill
«The mind is not a vessel to be filled but a fire to be kindled» Plutarch


modified 12-May-22 6:17am.

GeneralRe: "interface hack" to make private nested class instances available to outer class methods ? Pin
Richard Deeming12-May-22 0:19
mveRichard Deeming12-May-22 0:19 
GeneralRe: "interface hack" to make private nested class instances available to outer class methods ? Pin
BillWoodruff12-May-22 1:12
professionalBillWoodruff12-May-22 1:12 
GeneralRe: "interface hack" to make private nested class instances available to outer class methods ? Pin
Richard Deeming12-May-22 2:18
mveRichard Deeming12-May-22 2:18 
GeneralRe: "interface hack" to make private nested class instances available to outer class methods ? Pin
BillWoodruff12-May-22 2:32
professionalBillWoodruff12-May-22 2:32 
AnswerRe: "interface hack" to make private nested class instances available to outer class methods ? Pin
Richard MacCutchan11-May-22 3:19
mveRichard MacCutchan11-May-22 3:19 
GeneralRe: "interface hack" to make private nested class instances available to outer class methods ? Pin
BillWoodruff11-May-22 3:50
professionalBillWoodruff11-May-22 3:50 
GeneralRe: "interface hack" to make private nested class instances available to outer class methods ? Pin
harold aptroot11-May-22 10:28
harold aptroot11-May-22 10:28 
GeneralRe: "interface hack" to make private nested class instances available to outer class methods ? Pin
BillWoodruff11-May-22 17:34
professionalBillWoodruff11-May-22 17:34 

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.