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

C#

 
SuggestionRe: Why Interface? Pin
Richard Deeming18-Oct-16 4:30
mveRichard Deeming18-Oct-16 4:30 
GeneralRe: Why Interface? Pin
OriginalGriff18-Oct-16 4:41
mveOriginalGriff18-Oct-16 4:41 
AnswerRe: Why Interface? Pin
Gerry Schmitz18-Oct-16 6:21
mveGerry Schmitz18-Oct-16 6:21 
JokeRe: Why Interface? Pin
Pete O'Hanlon18-Oct-16 9:20
mvePete O'Hanlon18-Oct-16 9:20 
GeneralRe: Why Interface? Pin
Gerry Schmitz18-Oct-16 20:36
mveGerry Schmitz18-Oct-16 20:36 
AnswerRe: Why Interface? Pin
Eddy Vluggen18-Oct-16 11:17
professionalEddy Vluggen18-Oct-16 11:17 
SuggestionRe: Why Interface? Pin
Richard Deeming18-Oct-16 12:21
mveRichard Deeming18-Oct-16 12:21 
GeneralRe: Why Interface? Pin
Eddy Vluggen18-Oct-16 12:36
professionalEddy Vluggen18-Oct-16 12:36 
Richard Deeming wrote:
Unfortunately, not the best example. Smile | :)
Best example I could come up with based on practical use. It is a pattern that is easily recognized because many people used it in one form or another, and where you have an easy to explain benefit that is easily achieved.

Richard Deeming wrote:
Also, given the huge difference in the syntax used to access different databases / providers, you're unlikely to be able to reuse your database code anyway.
Yes. Next to their specialized dialects most databases also adhere to some form of a standard, with mine being SQL92.

I am not saying that you can make a complex application database-independant by swapping out some type-declarations, I'm claiming it is one of the things you can achieve if you are aware of their existence.

Another simple example would be to program against an interface and couple it with a class lateron. Something like "ISomeFancyEngine engine = new ISomeFancyEngine()". Not the best way to highlight anything an interface can do, but an example that shows a direct benefit one might have.
Bastard Programmer from Hell Suspicious | :suss:
If you can't read my code, try converting it here[^]

QuestionCan't insert inkPicture into SQL Server database from C# Pin
Member 1178659318-Oct-16 0:17
Member 1178659318-Oct-16 0:17 
AnswerRe: Can't insert inkPicture into SQL Server database from C# Pin
OriginalGriff18-Oct-16 0:22
mveOriginalGriff18-Oct-16 0:22 
AnswerRe: Can't insert inkPicture into SQL Server database from C# Pin
Richard Deeming18-Oct-16 1:49
mveRichard Deeming18-Oct-16 1:49 
GeneralRe: Can't insert inkPicture into SQL Server database from C# Pin
Member 1178659318-Oct-16 18:33
Member 1178659318-Oct-16 18:33 
GeneralRe: Can't insert inkPicture into SQL Server database from C# Pin
Member 1178659318-Oct-16 19:05
Member 1178659318-Oct-16 19:05 
GeneralRe: Can't insert inkPicture into SQL Server database from C# Pin
Richard Deeming19-Oct-16 2:07
mveRichard Deeming19-Oct-16 2:07 
QuestionRe: Can't insert inkPicture into SQL Server database from C# Pin
Eddy Vluggen19-Oct-16 3:35
professionalEddy Vluggen19-Oct-16 3:35 
QuestionConvert Char[ ] To Char ? [ ] Pin
MadDashCoder16-Oct-16 18:15
MadDashCoder16-Oct-16 18:15 
AnswerRe: Convert Char[ ] To Char ? [ ] Pin
Midi_Mick16-Oct-16 19:30
professionalMidi_Mick16-Oct-16 19:30 
AnswerRe: Convert Char[ ] To Char ? [ ] Pin
Nelson Costa Inácio18-Oct-16 4:44
Nelson Costa Inácio18-Oct-16 4:44 
QuestionUpdateProgress no disappear when i have a AsyncFileUpload control inside updatepanel Pin
whitesoul0115-Oct-16 4:26
whitesoul0115-Oct-16 4:26 
AnswerRe: UpdateProgress no disappear when i have a AsyncFileUpload control inside updatepanel Pin
Midi_Mick15-Oct-16 7:43
professionalMidi_Mick15-Oct-16 7:43 
SuggestionRe: UpdateProgress no disappear when i have a AsyncFileUpload control inside updatepanel Pin
Richard Deeming17-Oct-16 1:17
mveRichard Deeming17-Oct-16 1:17 
QuestionPrint if checkbox ticked? Pin
Member 1062775714-Oct-16 10:45
Member 1062775714-Oct-16 10:45 
AnswerRe: Print if checkbox ticked? Pin
NotPolitcallyCorrect14-Oct-16 11:39
NotPolitcallyCorrect14-Oct-16 11:39 
AnswerRe: Print if checkbox ticked? Pin
Midi_Mick14-Oct-16 14:09
professionalMidi_Mick14-Oct-16 14:09 
AnswerRe: Print if checkbox ticked? Pin
omeecode17-Oct-16 18:46
omeecode17-Oct-16 18:46 

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.