Click here to Skip to main content
15,916,846 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to Implement Private methods in an Interface Pin
Keith Barrow11-Oct-10 2:36
professionalKeith Barrow11-Oct-10 2:36 
You can't it is against the language syntax because, as DaveyMnn said, it wouldn't make sense. Interfaces are there to define members that are publically available in the class.

If you want to protect code from external use it cannot be part of the Interface. You can however call private or protected methods (which cannot be in the Interface) from your public ones (which can).

AnswerRe: How to Implement Private methods in an Interface Pin
PIEBALDconsult11-Oct-10 3:05
mvePIEBALDconsult11-Oct-10 3:05 
AnswerRe: How to Implement Private methods in an Interface Pin
Luc Pattyn11-Oct-10 3:09
sitebuilderLuc Pattyn11-Oct-10 3:09 
GeneralRe: How to Implement Private methods in an Interface Pin
Pete O'Hanlon11-Oct-10 3:17
mvePete O'Hanlon11-Oct-10 3:17 
GeneralRe: How to Implement Private methods in an Interface Pin
Luc Pattyn11-Oct-10 3:34
sitebuilderLuc Pattyn11-Oct-10 3:34 
GeneralRe: How to Implement Private methods in an Interface Pin
Keith Barrow11-Oct-10 3:34
professionalKeith Barrow11-Oct-10 3:34 
GeneralRe: How to Implement Private methods in an Interface Pin
Pete O'Hanlon11-Oct-10 3:42
mvePete O'Hanlon11-Oct-10 3:42 
AnswerRe: How to Implement Private methods in an Interface Pin
Bernhard Hiller11-Oct-10 3:29
Bernhard Hiller11-Oct-10 3:29 
QuestionSQL Sever 2005 is not working on 64bit Win7 Pin
Said Ali Jalali10-Oct-10 21:57
Said Ali Jalali10-Oct-10 21:57 
AnswerRe: SQL Sever 2005 is not working on 64bit Win7 Pin
jschell11-Oct-10 8:10
jschell11-Oct-10 8:10 
AnswerRe: SQL Sever 2005 is not working on 64bit Win7 Pin
AspDotNetDev12-Oct-10 13:28
protectorAspDotNetDev12-Oct-10 13:28 
AnswerRe: SQL Sever 2005 is not working on 64bit Win7 Pin
Alonso Calle17-Dec-10 20:21
Alonso Calle17-Dec-10 20:21 
QuestionGenerate files using Macros in Excel Pin
NarVish10-Oct-10 21:22
NarVish10-Oct-10 21:22 
AnswerRe: Generate files using Macros in Excel Pin
Richard MacCutchan11-Oct-10 0:26
mveRichard MacCutchan11-Oct-10 0:26 
GeneralRe: Generate files using Macros in Excel Pin
NarVish11-Oct-10 19:16
NarVish11-Oct-10 19:16 
QuestionBinary to hex Conversion ? Pin
deadlyabbas10-Oct-10 20:19
deadlyabbas10-Oct-10 20:19 
AnswerRe: Binary to hex Conversion ? Pin
Khaniya10-Oct-10 20:25
professionalKhaniya10-Oct-10 20:25 
GeneralRe: Binary to hex Conversion ? Pin
deadlyabbas10-Oct-10 22:55
deadlyabbas10-Oct-10 22:55 
AnswerRe: Binary to hex Conversion ? Pin
DaveyM6910-Oct-10 21:42
professionalDaveyM6910-Oct-10 21:42 
GeneralRe: Binary to hex Conversion ? Pin
deadlyabbas10-Oct-10 22:54
deadlyabbas10-Oct-10 22:54 
GeneralRe: Binary to hex Conversion ? Pin
DaveyM6910-Oct-10 23:59
professionalDaveyM6910-Oct-10 23:59 
AnswerRe: Binary to hex Conversion ? Pin
Luc Pattyn11-Oct-10 1:13
sitebuilderLuc Pattyn11-Oct-10 1:13 
QuestionProgram hangs... Pin
ayandelhi10-Oct-10 19:33
ayandelhi10-Oct-10 19:33 
AnswerRe: Program hangs... Pin
ScottM110-Oct-10 20:55
ScottM110-Oct-10 20:55 
AnswerRe: Program hangs... Pin
Rajesh Anuhya10-Oct-10 21:37
professionalRajesh Anuhya10-Oct-10 21:37 

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.