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

C#

 
GeneralRe: Does this ensure function1 and function2 use my class in thread safe way? Pin
Member 120616006-Feb-16 7:15
Member 120616006-Feb-16 7:15 
QuestionMessage Closed Pin
4-Feb-16 22:34
ginsa vaheed4-Feb-16 22:34 
AnswerRe: Can we developed c# code for Information KIOSK.? Pin
Pete O'Hanlon4-Feb-16 23:04
mvePete O'Hanlon4-Feb-16 23:04 
AnswerRe: Can we developed c# code for Information KIOSK.? Pin
F-ES Sitecore4-Feb-16 23:43
professionalF-ES Sitecore4-Feb-16 23:43 
GeneralRe: Can we developed c# code for Information KIOSK.? Pin
Richard Deeming5-Feb-16 3:50
mveRichard Deeming5-Feb-16 3:50 
GeneralRe: Can we developed c# code for Information KIOSK.? Pin
F-ES Sitecore5-Feb-16 4:02
professionalF-ES Sitecore5-Feb-16 4:02 
Questionwhen inheritance is ignored ? the limited scope of using 'new with methods Pin
BillWoodruff4-Feb-16 22:12
professionalBillWoodruff4-Feb-16 22:12 
AnswerRe: when inheritance is ignored ? the limited scope of using 'new with methods Pin
Eddy Vluggen4-Feb-16 23:56
professionalEddy Vluggen4-Feb-16 23:56 
Similar example as your found in the IDbConnection-classes; simplified, there's a property that shows the connection-state. Calling a method when using the wrong state will result in an exception offcourse.

..but yes, pass the boolean as a parameter and you can create a factory that returns either a class with five or one with seven members - but please don't abuse the constructor for that. Your construction-method is no longer part of the class being created.

Having seen the questions on CP on how to hide a proprerty from the UserControl-class, I still fail to see the value of hiding a public class-member. Simply make it private if you don't want it.

Make it private in the base, and implement it only on one of the inherited classes; that's not exactly hiding, that is simply not providing a method when it is not needed.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

AnswerRe: when inheritance is ignored ? the limited scope of using 'new with methods Pin
Sascha Lefèvre5-Feb-16 0:41
professionalSascha Lefèvre5-Feb-16 0:41 
AnswerRe: when inheritance is ignored ? the limited scope of using 'new with methods Pin
John Torjo6-Feb-16 2:13
professionalJohn Torjo6-Feb-16 2:13 
SuggestionRe: when inheritance is ignored ? the limited scope of using 'new with methods Pin
Sascha Lefèvre6-Feb-16 14:29
professionalSascha Lefèvre6-Feb-16 14:29 
GeneralRe: when inheritance is ignored ? the limited scope of using 'new with methods Pin
John Torjo6-Feb-16 14:42
professionalJohn Torjo6-Feb-16 14:42 
QuestionWrite log from multiple instances of an application. Pin
NJdotnetdev3-Feb-16 2:59
NJdotnetdev3-Feb-16 2:59 
AnswerRe: Write log from multiple instances of an application. Pin
Richard Deeming3-Feb-16 4:02
mveRichard Deeming3-Feb-16 4:02 
GeneralRe: Write log from multiple instances of an application. Pin
NJdotnetdev3-Feb-16 4:25
NJdotnetdev3-Feb-16 4:25 
GeneralRe: Write log from multiple instances of an application. Pin
Richard MacCutchan3-Feb-16 4:46
mveRichard MacCutchan3-Feb-16 4:46 
GeneralRe: Write log from multiple instances of an application. Pin
NJdotnetdev3-Feb-16 7:45
NJdotnetdev3-Feb-16 7:45 
GeneralRe: Write log from multiple instances of an application. Pin
Richard Deeming3-Feb-16 9:16
mveRichard Deeming3-Feb-16 9:16 
AnswerRe: Write log from multiple instances of an application. Pin
Daniel Pfeffer3-Feb-16 5:50
professionalDaniel Pfeffer3-Feb-16 5:50 
AnswerRe: Write log from multiple instances of an application. Pin
Gerry Schmitz3-Feb-16 8:15
mveGerry Schmitz3-Feb-16 8:15 
AnswerRe: Write log from multiple instances of an application. Pin
Eddy Vluggen3-Feb-16 9:15
professionalEddy Vluggen3-Feb-16 9:15 
AnswerRe: Write log from multiple instances of an application. Pin
John Torjo3-Feb-16 13:47
professionalJohn Torjo3-Feb-16 13:47 
QuestionI want write process synchronization for .Net applictaion Pin
Member 110856472-Feb-16 19:49
Member 110856472-Feb-16 19:49 
AnswerRe: I want write process synchronization for .Net applictaion Pin
Dave Kreskowiak3-Feb-16 2:43
mveDave Kreskowiak3-Feb-16 2:43 
QuestionWriting complex overload methods for LINQ queries Pin
Kenneth Haugland2-Feb-16 4:40
mvaKenneth Haugland2-Feb-16 4:40 

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.