Click here to Skip to main content
15,896,063 members
Home / Discussions / C#
   

C#

 
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 
QuestionProgressbar during WebService request Pin
Member 8276132-Nov-08 23:46
Member 8276132-Nov-08 23:46 
AnswerRe: Progressbar during WebService request Pin
#realJSOP2-Nov-08 23:58
professional#realJSOP2-Nov-08 23:58 
QuestionSystem.Convert.ToDouble(stringVal) Pin
dec822-Nov-08 23:28
dec822-Nov-08 23:28 
AnswerRe: System.Convert.ToDouble(stringVal) Pin
John Gathogo2-Nov-08 23:31
John Gathogo2-Nov-08 23:31 
AnswerRe: System.Convert.ToDouble(stringVal) Pin
Eddy Vluggen2-Nov-08 23:35
professionalEddy Vluggen2-Nov-08 23:35 
AnswerRe: System.Convert.ToDouble(stringVal) Pin
#realJSOP3-Nov-08 0:01
professional#realJSOP3-Nov-08 0:01 
QuestionGet alphabets of current culture Pin
karthikdeen2-Nov-08 23:05
karthikdeen2-Nov-08 23:05 
QuestionAlphabets of current culture Pin
karthikdeen2-Nov-08 23:04
karthikdeen2-Nov-08 23:04 
Questionthreading Pin
dec822-Nov-08 23:03
dec822-Nov-08 23:03 
AnswerRe: threading Pin
Pedram Behroozi2-Nov-08 23:26
Pedram Behroozi2-Nov-08 23:26 
AnswerRe: threading Pin
Eddy Vluggen2-Nov-08 23:33
professionalEddy Vluggen2-Nov-08 23:33 
AnswerRe: threading Pin
Vimalsoft(Pty) Ltd2-Nov-08 23:53
professionalVimalsoft(Pty) Ltd2-Nov-08 23:53 
AnswerRe: threading Pin
sumit70343-Nov-08 0:06
sumit70343-Nov-08 0:06 
QuestionListView and column header Pin
Sandeep Kalra2-Nov-08 22:45
Sandeep Kalra2-Nov-08 22:45 

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.