in

@Prog! - ASP.NET(C#) AJAX -

ASP.NET(C#) 2.0 & ASP.NET Ajax (ATLAS) のメモ書き

タグによる表示

  • Re: カスタム属性を作る

    public class Test { public List<A> GetAttributePropertyList<T, A>(T obj, string name) { List<A> list = new List<A>(); foreach (var property in obj.GetType().GetProperty(name).GetCustomAttributes(typeof(A), false)) { list.Add((A)property); } return list; } }
    投稿場所: C# .NET (Forum) 投稿者: ASANO 投稿日時: 2008/01/10
  • カスタム属性を収得する(System.Attribute)

    using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace TestConsoleApplication { class Program { [AttributeUsage(AttributeTargets.Property)] public class ColumnMappingAttribute : System.Attribute { private string _name; public ColumnMappingAttribute(string name...
    投稿場所: C# .NET (Forum) 投稿者: ASANO 投稿日時: 2008/01/10
ページ 1 / 1 (2 アイテム)