Click here to Skip to main content
15,914,594 members
Home / Discussions / C#
   

C#

 
AnswerRe: Making Forms Work on Different Screen Resolutions Programatically... Pin
#realJSOP3-Nov-08 1:56
professional#realJSOP3-Nov-08 1:56 
GeneralRe: Making Forms Work on Different Screen Resolutions Programatically... Pin
swjam3-Nov-08 2:10
swjam3-Nov-08 2:10 
GeneralRe: Making Forms Work on Different Screen Resolutions Programatically... Pin
Dan Neely3-Nov-08 2:22
Dan Neely3-Nov-08 2:22 
GeneralRe: Making Forms Work on Different Screen Resolutions Programatically... Pin
#realJSOP3-Nov-08 2:33
professional#realJSOP3-Nov-08 2:33 
AnswerRe: Making Forms Work on Different Screen Resolutions Programatically... Pin
Giorgi Dalakishvili3-Nov-08 2:36
mentorGiorgi Dalakishvili3-Nov-08 2:36 
AnswerRe: Making Forms Work on Different Screen Resolutions Programatically... Pin
Alan Balkany3-Nov-08 4:03
Alan Balkany3-Nov-08 4:03 
QuestionAbout Sip implementation Pin
waqas shah3-Nov-08 1:13
waqas shah3-Nov-08 1:13 
AnswerRe: About Sip implementation Pin
Eddy Vluggen3-Nov-08 1:46
professionalEddy Vluggen3-Nov-08 1:46 
AnswerRe: About Sip implementation Pin
AhsanS3-Nov-08 1:54
AhsanS3-Nov-08 1:54 
AnswerRe: About Sip implementation Pin
harold aptroot3-Nov-08 10:07
harold aptroot3-Nov-08 10:07 
QuestionColumn Header Not dispalying text in center Pin
Sandeep Kalra3-Nov-08 1:00
Sandeep Kalra3-Nov-08 1:00 
AnswerRe: Column Header Not dispalying text in center Pin
Dave Kreskowiak3-Nov-08 1:59
mveDave Kreskowiak3-Nov-08 1:59 
QuestionDataGridView navigation Pin
kanchoette3-Nov-08 0:33
kanchoette3-Nov-08 0:33 
AnswerRe: DataGridView navigation Pin
Giorgi Dalakishvili3-Nov-08 0:59
mentorGiorgi Dalakishvili3-Nov-08 0:59 
GeneralRe: DataGridView navigation Pin
kanchoette3-Nov-08 21:28
kanchoette3-Nov-08 21:28 
GeneralRe: DataGridView navigation Pin
nelsonpaixao3-Nov-08 12:32
nelsonpaixao3-Nov-08 12:32 
QuestionInterface member's attributes Pin
Mr. Candyman3-Nov-08 0:18
Mr. Candyman3-Nov-08 0:18 
AnswerRe: Interface member's attributes Pin
John Gathogo3-Nov-08 0:23
John Gathogo3-Nov-08 0:23 
GeneralRe: Interface member's attributes Pin
Mr. Candyman3-Nov-08 0:31
Mr. Candyman3-Nov-08 0:31 
GeneralRe: Interface member's attributes Pin
John Gathogo3-Nov-08 0:34
John Gathogo3-Nov-08 0:34 
AnswerRe: Interface member's attributes Pin
J4amieC3-Nov-08 1:34
J4amieC3-Nov-08 1:34 
AnswerRe: Interface member's attributes Pin
J4amieC3-Nov-08 2:21
J4amieC3-Nov-08 2:21 
Here you go, A simple test app.

class Program
{
    static void Main(string[] args)
    {            
        ExecTest(typeof(ITest));
        ExecTest(typeof(Test));
        Console.ReadLine();            
    }

    static void ExecTest(Type type)
    {
        PropertyInfo prop = type.GetProperty("PropertyName");
        if (prop == null)
            throw new InvalidOperationException("invalid type - must have PropertyName property");
        object[] attrs = prop.GetCustomAttributes(typeof(DefaultSettingValueAttribute), true);
        Console.WriteLine("Number of DefaultSettingValueAttribute's on '{1}': {0}", attrs.Length,type.Name);
    }


    public class Test : ITest
    {
        #region ITest Members

        public string PropertyName
        {
            get
            {
                throw new NotImplementedException();
            }
            set
            {
                throw new NotImplementedException();
            }
        }

        #endregion
    }

    public interface ITest
    {
        [DefaultSettingValue("test")]
        string PropertyName { get; set; }
    }
}

Questionto get all services in the machine Pin
prasadbuddhika3-Nov-08 0:13
prasadbuddhika3-Nov-08 0:13 
AnswerRe: to get all services in the machine Pin
John Gathogo3-Nov-08 0:19
John Gathogo3-Nov-08 0:19 
GeneralRe: to get all services in the machine Pin
prasadbuddhika3-Nov-08 0:42
prasadbuddhika3-Nov-08 0:42 

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.