StackExtensionsPeekT Method
Returns the specified amount of objects from the top of the StackT.
Namespace: DevCase.Extensions.StackExtensionsAssembly: 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 T[] Peek<T>(
this Stack<T> sender,
int amount
)
<ExtensionAttribute>
<EditorBrowsableAttribute(EditorBrowsableState.Always)>
Public Shared Function Peek(Of T) (
sender As Stack(Of T),
amount As Integer
) As T()
Dim sender As Stack(Of T)
Dim amount As Integer
Dim returnValue As T()
returnValue = sender.Peek(amount)
public:
[ExtensionAttribute]
[EditorBrowsableAttribute(EditorBrowsableState::Always)]
generic<typename T>
static array<T>^ Peek(
Stack<T>^ sender,
int amount
)
[<ExtensionAttribute>]
[<EditorBrowsableAttribute(EditorBrowsableState.Always)>]
static member Peek :
sender : Stack<'T> *
amount : int -> 'T[]
No code example is currently available or this language may not be supported.
- sender StackT
-
The source StackT.
- amount Int32
-
The amount of items to peek.
- T
-
The type.
T
The objects from the top of the
StackT.
In Visual Basic and C#, you can call this method as an instance method on any object of type
StackT. 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.
Dim myStack As New Stack(Of String)
myStack.Push("1")
myStack.Push("2")
myStack.Push("3")
Dim items As String() = myStack.Peek(3)
MsgBox(String.Join("", items))
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.
ArgumentOutOfRangeException
|
amount
|