I'd like to bring an issue when i try to work with class
The error happens when i try to work to put the object inside a System.Collections.Generic.List
When i move my mouse over the variable $Bouchonlist in the line $Bouchonlist = [System.Collections.Generic.List[bouchon]]::new()
or when i try to use directly the variable $Bouchonlist to access the methods.
PSS freeze and a dialog box appears with a message "Unhandled Exception: The specified method is not supported."
This work fine on ISE
In the first case (mouse over) the error log appear with this error and i need to close the file and reopen it to work again
--------------------------------------------------
[2018.10.20 - 23:11:37] Unhandled Exception:
La méthode spécifiée n'est pas prise en charge.
à System.Reflection.Emit.TypeBuilderInstantiation.GetConstructors(BindingFlags bindingAttr)
à ..(Type , String , Boolean , Int32& , Int32 )
à ..(IToken , Int32& , Type , Int32 )
à ..(Int32& , Int32 )
à ..(IToken , Int32& , Int32 )
à ..(Int32& , Int32 , Boolean , Boolean )
à ..( , IToken )
à ..( , String , Int32 , Type& )
à ..(IToken )
à ..(SyntaxEditor , EditorViewMouseEventArgs )
à ActiproSoftware.SyntaxEditor.SyntaxLanguage.#JYe(SyntaxEditor #bCb, EditorViewMouseEventArgs #yhb)
à ActiproSoftware.SyntaxEditor.SyntaxEditor.#t3e(EditorViewMouseEventArgs #yhb)
à ActiproSoftware.SyntaxEditor.EditorView.OnMouseHover(MouseEventArgs e)
à ActiproSoftware.WinUICore.UIElement.#gxe(MouseEventArgs #yhb)
à ActiproSoftware.WinUICore.UIControl.OnMouseHover(EventArgs e)
à System.Windows.Forms.Control.WndProc(Message& m)
à ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
On the second case (when i try to use directly the variable) the error log appear with this error and if i wait some time PSS seems ok and i can work again.
--------------------------------------------------
[2018.10.20 - 23:15:06] Unhandled Exception:
La méthode spécifiée n'est pas prise en charge.
à System.Reflection.Emit.TypeBuilderInstantiation.GetConstructors(BindingFlags bindingAttr)
à ..(Type , String , Boolean , Int32& , Int32 )
à ..(IToken , Int32& , Type , Int32 )
à ..(Int32& , Int32 )
à ..(IToken , Int32& , Int32 )
à ..(Int32& , Int32 , Boolean , Boolean )
à ..( , IToken )
à ..( , String , Int32 , Type& )
à ..(IToken )
à ..(Int32 , IToken , String& )
à ..(Int32 , IToken , String& , Object& )
à ..(SyntaxEditor , Int32 )
à ..(SyntaxEditor , KeyTypedEventArgs )
à ActiproSoftware.SyntaxEditor.SyntaxEditor.#h3e(EditorView #N5b, Keys #oVe, Char #2Ne, Boolean #5Pe)
à ActiproSoftware.SyntaxEditor.SyntaxEditor.OnKeyPress(KeyPressEventArgs e)
à System.Windows.Forms.Control.ProcessKeyEventArgs(Message& m)
à System.Windows.Forms.Control.WmKeyChar(Message& m)
à System.Windows.Forms.Control.WndProc(Message& m)
à ActiproSoftware.SyntaxEditor.SyntaxEditor.WndProc(Message& m)
à System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
--------------------------------------------------
- Class bouchon{
- [string]$name
- [int]$size
- [string]$Maker
- bouchon()
- {
- }
- [Void]Insert([String]$name, [int]$size, [string]$Maker)
- {
- $this.Name = $name
- $this.size = $size
- $this.Maker = $Maker
- }
- }
- $Bouchonlist = [System.Collections.Generic.List[bouchon]]::new()
- $Model = [bouchon]::new()
- $Model.Insert("Bouchon1", "2", "John")
Version : 5.5.155
OS : Windows 10 1709 (64 bit)
Thanks for the help.