Click here to Skip to main content
       

C#

 
GeneralRe: Manual Coding vs Code Generation PinmemberOrjan Westin16-Nov-12 3:25 
AnswerRe: Manual Coding vs Code Generation PinmemberBobJanova16-Nov-12 3:25 
AnswerRe: Manual Coding vs Code Generation PinmemberMarcus Kramer16-Nov-12 7:11 
GeneralRe: Manual Coding vs Code Generation PinmemberPhanindra26116-Nov-12 7:56 
GeneralRe: Manual Coding vs Code Generation PinmemberMarcus Kramer16-Nov-12 8:26 
AnswerRe: Manual Coding vs Code Generation PinmemberMycroft Holmes16-Nov-12 15:37 
GeneralRe: Manual Coding vs Code Generation PinmemberPIEBALDconsult21-Nov-12 17:51 
GeneralRe: Manual Coding vs Code Generation PinmemberMycroft Holmes21-Nov-12 18:46 
GeneralRe: Manual Coding vs Code Generation PinmemberPIEBALDconsult22-Nov-12 9:51 
AnswerRe: Manual Coding vs Code Generation PinmemberPIEBALDconsult21-Nov-12 4:00 
QuestionDesign Question PinmemberTheGermoz15-Nov-12 17:31 
AnswerRe: Design Question PinmentorDaveyM6915-Nov-12 19:31 
GeneralRe: Design Question PinmemberTheGermoz15-Nov-12 20:11 
AnswerRe: Design Question PinmemberRahul Rajat Singh15-Nov-12 21:43 
Why not make I2 and abstract class so that when I2's methods are not implemented by ClassA the default empty implementation will work. here is some sample code:
 
Note: Replace I2 with A2 and ClassA and ClassA2 are two possible versions you could have for ClassA
 
    public interface I1
    {
        void A();
        void B();
    }
    public abstract class A2 : I1
    {
        public virtual void C()
        {
            //nothing in default implementation
        }
        public virtual void D()
        {
            //nothing in default implementation
        }
 
        #region I1 Members
 
        public abstract void A();
        public abstract void B();
 
        #endregion
    }
 
    // case 1
    // fuction A and B will be there always
    // not implementing C and D
    public class ClassA : A2
    {
        public override void A()
        {
 
        }
 
        public override void B()
        {
 
        }
    }
 
    // case 2
    // fuction A and B will be there always
    // ALSO implementing C and D
    public class ClassA2 : A2
    {
        public override void A()
        {
 
        }
 
        public override void B()
        {
 
        }
 
        public override void C()
        {
 
        }
 
        public override void D()
        {
 
        }
    }
Every now and then say, "What the Elephant." "What the Elephant" gives you freedom. Freedom brings opportunity. Opportunity makes your future.

GeneralRe: Design Question PinmemberTheGermoz15-Nov-12 23:14 
AnswerRe: Design Question PinmemberRahul Rajat Singh15-Nov-12 23:22 
AnswerRe: Design Question PinmemberBobJanova15-Nov-12 23:12 
GeneralRe: Design Question PinmemberTheGermoz15-Nov-12 23:16 
GeneralRe: Design Question PinmemberRahul Rajat Singh15-Nov-12 23:35 
GeneralRe: Design Question PinmemberBobJanova16-Nov-12 0:09 
AnswerRe: Design Question PinmemberSledgeHammer0116-Nov-12 9:53 
GeneralRe: Design Question PinmemberTheGermoz16-Nov-12 10:06 
AnswerRe: Design Question PinmemberClifford Nelson16-Nov-12 9:53 
QuestionBackground worker thread PinmemberMAW3015-Nov-12 14:54 
AnswerRe: Background worker thread PinmentorDaveyM6915-Nov-12 18:51 
QuestionArray, Struct, Class??? I'm so confused.... PinmemberKKW_acd15-Nov-12 6:29 
AnswerRe: Array, Struct, Class??? I'm so confused.... [modified] PinmentorDaveyM6915-Nov-12 6:55 
GeneralRe: Array, Struct, Class??? I'm so confused.... PinmemberKKW_acd15-Nov-12 9:03 
AnswerRe: Array, Struct, Class??? I'm so confused.... PinmentorDaveyM6915-Nov-12 19:02 
GeneralRe: Array, Struct, Class??? I'm so confused.... PinmvpRichard MacCutchan16-Nov-12 0:02 
AnswerRe: Array, Struct, Class??? I'm so confused.... PinmvpRichard MacCutchan15-Nov-12 7:06 
AnswerRe: Array, Struct, Class??? I'm so confused.... PinmemberBobJanova16-Nov-12 0:16 
QuestionWind Chill Automation with C# application Pinmemberomisheikh15-Nov-12 6:03 
AnswerRe: Wind Chill Automation with C# application Pinmemberjschell15-Nov-12 8:12 
GeneralRe: Wind Chill Automation with C# application Pinmemberomisheikh16-Nov-12 3:25 
GeneralRe: Wind Chill Automation with C# application Pinmemberjschell17-Nov-12 5:40 
GeneralRe: Wind Chill Automation with C# application Pinmemberomisheikh18-Nov-12 21:00 
QuestionAccess mainform while subform is updating PinmemberMAW3014-Nov-12 19:01 
AnswerRe: Access mainform while subform is updating PinmemberMycroft Holmes14-Nov-12 19:53 
AnswerRe: Access mainform while subform is updating PinmentorDaveyM6915-Nov-12 0:02 
QuestionGet integer variable from datalist textbox for entry into SQL [modified] PinmemberMember 959997514-Nov-12 10:10 
AnswerRe: Get integer variable from datalist textbox for entry into SQL Pinmemberrajeshkasani0514-Nov-12 18:34 
GeneralRe: Get integer variable from datalist textbox for entry into SQL PinmemberMember 959997514-Nov-12 22:50 
GeneralRe: Get integer variable from datalist textbox for entry into SQL Pinmemberrajeshkasani0514-Nov-12 22:55 
GeneralRe: Get integer variable from datalist textbox for entry into SQL PinmemberMember 959997515-Nov-12 2:25 
GeneralRe: Get integer variable from datalist textbox for entry into SQL PinmvpRichard MacCutchan15-Nov-12 3:21 
QuestionC# clear out global cache Pinmemberdcof14-Nov-12 7:52 
AnswerRe: C# clear out global cache Pinmemberjschell14-Nov-12 8:00 
AnswerRe: C# clear out global cache [modified] PinprotectorPete O'Hanlon14-Nov-12 11:00 
GeneralRe: C# clear out global cache PinmembercptKoala14-Nov-12 21:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.


Advertise | Privacy | Mobile
Web02 | 2.8.140916.1 | Last Updated 17 Sep 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid