G
Greg Young
I found this while answerring a question yesterday .. I must be missing
something.
2.0
DbDataAdapter:ispose()
..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
}
the value loded here is System.ComponentModel.EditorBrowsableState.Never.
What's interesting is that in VS 2005 it still shows up in intellisense for
me even though
it shouldn't per the documentation unless I am missing something somewhere
else
http://msdn2.microsoft.com/en-us/library/system.componentmodel.editorbrowsableattribute.aspx
Can't quite figure out why (I have even tried an example re-implementing the
interface as it does thinking that perhaps the re-implementation caused it).
---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
}
}
But this still does not show up in intellisense so why is the
DbDataAdapter:ispose showing up in intellisense even though it is
decorated to not show up?
Cheers,
Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung
something.
2.0
DbDataAdapter:ispose()
..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
}
the value loded here is System.ComponentModel.EditorBrowsableState.Never.
What's interesting is that in VS 2005 it still shows up in intellisense for
me even though
it shouldn't per the documentation unless I am missing something somewhere
else
http://msdn2.microsoft.com/en-us/library/system.componentmodel.editorbrowsableattribute.aspx
Can't quite figure out why (I have even tried an example re-implementing the
interface as it does thinking that perhaps the re-implementation caused it).
---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
}
}
But this still does not show up in intellisense so why is the
DbDataAdapter:ispose showing up in intellisense even though it is
decorated to not show up?
Cheers,
Greg Young
MVP - C#
http://codebetter.com/blogs/gregyoung