JaedenRuiner
Well-known member
- Joined
- Aug 13, 2007
- Messages
- 340
- Programming Experience
- 10+
Any one know why it is stated in several of the documentations that such and such is an "Extension Class" for something, and when looked upon in the refractor it looks something like this:
(example used is for the DataTableExtensions)
however if I the programmer who wishes to use this wonderful feature, try to utilize the Extension attribute in a similar fashion I get:
So who is wrong? are they just being...jerks...and preventing us from doing similar cool things, or is the refractor not displaying the declarations correctly?
Thanks
(example used is for the DataTableExtensions)
VB.NET:
<Extension> _
Public Class DataTableExtensions
' Methods
<Extension> _
Public Shared Function AsDataView(Of T As DataRow)(ByVal source As EnumerableRowCollection(Of T)) As DataView
<Extension> _
Public Shared Function AsDataView(ByVal table As DataTable) As DataView
<Extension> _
Public Shared Function AsEnumerable(ByVal source As DataTable) As EnumerableRowCollection(Of DataRow)
<Extension> _
Public Shared Function CopyToDataTable(Of T As DataRow)(ByVal source As IEnumerable(Of T)) As DataTable
<Extension> _
Public Shared Sub CopyToDataTable(Of T As DataRow)(ByVal source As IEnumerable(Of T), ByVal table As DataTable, ByVal options As LoadOption)
<Extension> _
Public Shared Sub CopyToDataTable(Of T As DataRow)(ByVal source As IEnumerable(Of T), ByVal table As DataTable, ByVal options As LoadOption, ByVal errorHandler As FillErrorEventHandler)
Private Shared Function LoadTableFromEnumerable(Of T As DataRow)(ByVal source As IEnumerable(Of T), ByVal table As DataTable, ByVal options As LoadOption?, ByVal errorHandler As FillErrorEventHandler) As DataTable
End Class
however if I the programmer who wishes to use this wonderful feature, try to utilize the Extension attribute in a similar fashion I get:
Extension can only be used on a Module, Sub, or Function
So who is wrong? are they just being...jerks...and preventing us from doing similar cool things, or is the refractor not displaying the declarations correctly?
Thanks