ArrayExtensionsDeinitializeAllT(T) Method
Deinitializes all the elements of the specified Array.
This method just turns to
all the elements,
if you also need to dispose them, call
DisposeAllT(IEnumerableT) method instead.
Namespace: DevCase.Extensions.ArrayExtensionsAssembly: DevCase.net48 (in DevCase.net48.dll) Version: 6.0.0.0 (6.0)
XMLNS for XAML: Not mapped to an xmlns.
[EditorBrowsableAttribute(EditorBrowsableState.Always)]
public static void DeinitializeAll<T>(
this T[] sender
)
where T : new()
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Sub DeinitializeAll(Of T As New) (
sender As T()
)
Dim sender As T()
sender.DeinitializeAll()
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
generic<typename T>
where T : gcnew()
static void DeinitializeAll(
array<T>^ sender
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member DeinitializeAll :
sender : 'T[] -> unit when 'T : new()
No code example is currently available or this language may not be supported.
- sender T
-
The source Array.
- T
-
The type.
In Visual Basic and C#, you can call this method as an instance method on any object of type
T. When you use instance method syntax to call this method, omit the first parameter. For more information, see
Extension Methods (Visual Basic) or
Extension Methods (C# Programming Guide).
This is a code example.
No code example is currently available or this language may not be supported.
Public Class Form1 : Inherits Form
Private Sub Test(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Shown
Dim myCol As MyDisposableType() = {New MyDisposableType}
myCol.DeinitializeAll()
Try
MsgBox(myCol(0).MyField)
Catch ex As NullReferenceException
MsgBox(ex.Message)
End Try
End Sub
End Class
Public Class MyType
Public MyField As String
Public Sub New()
Me.MyField = "Default field initialization value"
End Sub
End Class
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.
No code example is currently available or this language may not be supported.