2.0
.method public hidebysig newslot virtual final instance void Dispose() cil
managed
{
.custom instance void
[System]System.ComponentModel.EditorBrowsableAttribute::.ctor([System]System.ComponentModel.EditorBrowsableState)
= ( int32(0x00000001) )
.maxstack 2
L_0000: ldarg.0
L_0001: ldc.i4.1
L_0002: callvirt instance void
System.Data.Common.DbDataReader:

ispose(bool)
L_0007: ret
}
What's interesting is that in VS 2005 it still shows up for me even though
it shouldn't per the documentation unless I am missing something some where
else
http://msdn2.microsoft.com/en-us/library/system.componentmodel.editorbrowsableattribute.aspx
the value loded here is System.ComponentModel.EditorBrowsableState.Never.
Can't quite figure out why (I have even tried an example re-implementing the
interface as it does).
---library assembly
public class Class1 : IAge{
int ageval;
[EditorBrowsable(EditorBrowsableState.Never)]
public int Age {
get { return ageval; }
set {
if (!ageval.Equals(value)) {
ageval = value;
}
}
}
}
public class Class2 : Class1, IAge {
}
public interface IAge {
int Age {
get;
}
}
--- main assembly
class Program {
static void Main(string[] args) {
Class2 f = new Class1();
//no f.age
}
}
Cheers,
Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung
Joanna Carter said:
"Greg Young" <
[email protected]> a écrit dans le message
de
%
[email protected]...
| Ah yes we should have been clear about which version of the framework.
1.x
| does use an explicit interface implementation!
Ah, OK Greg, I assumed explicit and didn't realise it had changed. Thanks.
Joanna