Click here to Skip to main content
15,845,103 members
Home / Discussions / C#
   

C#

 
AnswerRe: Ignore Error Pin
OriginalGriff8-Jun-16 21:30
mveOriginalGriff8-Jun-16 21:30 
GeneralRe: Ignore Error Pin
sunsher12-Jun-16 13:42
sunsher12-Jun-16 13:42 
GeneralRe: Ignore Error Pin
OriginalGriff12-Jun-16 22:05
mveOriginalGriff12-Jun-16 22:05 
QuestionSystem.NullReferenceException Pin
sunsher8-Jun-16 13:48
sunsher8-Jun-16 13:48 
AnswerRe: System.NullReferenceException Pin
Matt T Heffron8-Jun-16 14:56
professionalMatt T Heffron8-Jun-16 14:56 
AnswerRe: System.NullReferenceException Pin
BillWoodruff8-Jun-16 14:58
professionalBillWoodruff8-Jun-16 14:58 
GeneralRe: System.NullReferenceException Pin
sunsher8-Jun-16 19:57
sunsher8-Jun-16 19:57 
GeneralRe: System.NullReferenceException Pin
sunsher8-Jun-16 20:10
sunsher8-Jun-16 20:10 
I have got it working like this.

C#
public interface ISettings
{
    string Color { get; set; }
}
 
public interface IDimensions
{
     Settings objSettings = new Settings();

    int Height { set; get; }
  
    ISettings Settings 
    { 
        get
        {
            return objSettings; 
        }
        set{ }
}
 
public class Settings : ISettings
{
   string Color { get; set; }
}

public class Dimensions : IDimensions
{
    public int Height { set; get; }
 
    public Dimensions(int height)
    {
        Height = height;
    }
}


Is this the right coding? It anyway worked for me.

Thanks
GeneralRe: System.NullReferenceException Pin
Pete O'Hanlon8-Jun-16 22:15
subeditorPete O'Hanlon8-Jun-16 22:15 
GeneralRe: System.NullReferenceException Pin
BillWoodruff8-Jun-16 22:54
professionalBillWoodruff8-Jun-16 22:54 
Questionpassword policy using c# Pin
forest4ever7-Jun-16 21:33
forest4ever7-Jun-16 21:33 
AnswerRe: password policy using c# Pin
Garth J Lancaster7-Jun-16 21:44
professionalGarth J Lancaster7-Jun-16 21:44 
AnswerRe: password policy using c# Pin
Mycroft Holmes7-Jun-16 23:19
professionalMycroft Holmes7-Jun-16 23:19 
AnswerRe: password policy using c# Pin
OriginalGriff7-Jun-16 23:28
mveOriginalGriff7-Jun-16 23:28 
QuestionSet window on top from ShellExecute? Pin
kenw2327-Jun-16 12:25
kenw2327-Jun-16 12:25 
AnswerRe: Set window on top from ShellExecute? Pin
Eddy Vluggen7-Jun-16 13:10
professionalEddy Vluggen7-Jun-16 13:10 
AnswerRe: Set window on top from ShellExecute? Pin
BillWoodruff8-Jun-16 8:26
professionalBillWoodruff8-Jun-16 8:26 
QuestionHow can I format a text selection in bold AND italic? Pin
Member 119167357-Jun-16 0:23
Member 119167357-Jun-16 0:23 
AnswerRe: How can I format a text selection in bold AND italic? Pin
OriginalGriff7-Jun-16 0:39
mveOriginalGriff7-Jun-16 0:39 
GeneralRe: How can I format a text selection in bold AND italic? Pin
Member 119167357-Jun-16 1:02
Member 119167357-Jun-16 1:02 
GeneralRe: How can I format a text selection in bold AND italic? Pin
OriginalGriff7-Jun-16 1:20
mveOriginalGriff7-Jun-16 1:20 
GeneralRe: How can I format a text selection in bold AND italic? Pin
Member 119167357-Jun-16 1:23
Member 119167357-Jun-16 1:23 
GeneralRe: How can I format a text selection in bold AND italic? Pin
OriginalGriff7-Jun-16 1:45
mveOriginalGriff7-Jun-16 1:45 
Questionsend an acknowledgement in serial port listner Pin
Member 125557476-Jun-16 22:00
Member 125557476-Jun-16 22:00 
AnswerRe: send an acknowledgement in serial port listner Pin
Richard MacCutchan6-Jun-16 22:16
mveRichard MacCutchan6-Jun-16 22:16 

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.