R
Reshma Prabhu
hello,
I am getting errors in the line
BindableAttribute myAttribute =
(BindableAttribute)attributes[typeof("Assembly text name, Version, Culture,
PublicKeyToken")];
The errors are
Type expected
Invalid expression term ']'
Invalid expression term ')'
; expected
; expected
The actual code is
using System;
using System.ComponentModel;
using System.Windows.Forms;
public class Form1: Form
{
protected TextBox textBox1;
protected void Method()
{
// Gets the attributes for the property.
AttributeCollection attributes =
TypeDescriptor.GetProperties(this)["MyProperty"].Attributes;
// Checks to see if the property is bindable.
// You must supply a valid fully qualified assembly name here.
BindableAttribute myAttribute =
(BindableAttribute)attributes[typeof("Assembly text name, Version, Culture,
PublicKeyToken")];
if(myAttribute.Bindable) {
// Insert code here.
}
}
}
Can any one help me out?
Thanks,
I am getting errors in the line
BindableAttribute myAttribute =
(BindableAttribute)attributes[typeof("Assembly text name, Version, Culture,
PublicKeyToken")];
The errors are
Type expected
Invalid expression term ']'
Invalid expression term ')'
; expected
; expected
The actual code is
using System;
using System.ComponentModel;
using System.Windows.Forms;
public class Form1: Form
{
protected TextBox textBox1;
protected void Method()
{
// Gets the attributes for the property.
AttributeCollection attributes =
TypeDescriptor.GetProperties(this)["MyProperty"].Attributes;
// Checks to see if the property is bindable.
// You must supply a valid fully qualified assembly name here.
BindableAttribute myAttribute =
(BindableAttribute)attributes[typeof("Assembly text name, Version, Culture,
PublicKeyToken")];
if(myAttribute.Bindable) {
// Insert code here.
}
}
}
Can any one help me out?
Thanks,