op_Subtraction

This topic contains 2 replies, has 2 voices, and was last updated by  Renaud 3 weeks, 5 days ago.

  • Author
    Posts
  • #103070

    Renaud
    Participant

    Hi everybody ^^,

    I'm a beginner in Powershell, this time i'm learning how to do a Powershell GUI with Visual Studio in WPF.

    The video is : https://www.youtube.com/watch?v=uJcvwgbTeks&list=PLsg-xXEEmCJozYQCiBxO5ydYI1KIV2pI4&index=1

    During this video we must create an empty hashtable with the command :
    $wpf – @{ }
    and then error:
    Échec lors de l'appel de la méthode, car [System.Collections.Hashtable] ne contient pas de méthode nommée « op_Subtraction ».
    Au caractère Ligne:1 : 1
    + $wpf – @{}
    + ~~~~~~~~~~
    + CategoryInfo : InvalidOperation : (op_Subtraction:String) [], RuntimeException
    + FullyQualifiedErrorId : MethodNotFound

    i don't know how to resolve this problem, Thx for help me 😉

  • #103073

    Steve Moss
    Participant

    The – should be =

    So

    $wpf = @{ }

  • #103109

    Renaud
    Participant

    Thx for your replay.
    The dash was wierd yes but when he execute the command in his system, the command works, but perhaps it's a n alias of "=".

    Ok thx ^^

You must be logged in to reply to this topic.