lausivcid,
Well, you have applied the attribute to a property, so you have to get
the PropertyInfo for that property (Name) and then call GetCustomAttributes
on that.

Signature
- Nicholas Paldino [.NET/C# MVP]
- mvp@spam.guard.caspershouse.com
> Hi,
>
[quoted text clipped - 31 lines]
> Thanks,
> lausivcid
lausivcid - 23 Oct 2007 21:30 GMT
Thanks! For
[Column(Storage="_Name", DbType="VarChar(256) NOT
NULL", CanBeNull=false)]
public string Name
{
get
{
return this._Name;
}
set
{
if ((this._Name != value))
{
this.OnNameChanging(value);
this.SendPropertyChanging();
this._Name = value;
this.SendPropertyChanged("Name");
this.OnNameChanged();
}
}
}
The class tyoe for this property is "job". The below code gets the
DbType string I am looking for.
foreach (MemberInfo mi in
job.GetType().GetMembers())
{
string attrib=
((System.Data.Linq.Mapping.ColumnAttribute)(mi.GetCustomAttributes(false)[0])).DbType;
}
>lausivcid,
>
> Well, you have applied the attribute to a property, so you have to get
>the PropertyInfo for that property (Name) and then call GetCustomAttributes
>on that.