In PowerShell:
@{extensionAttribute2="Neuer Wert"}
means a Hashtable literal, not just a string . So in C # you also need to create a Hashtable object:
new Hashtable{{"extensionAttribute2","Neuer Wert"}}
Although this is not completely equivalent to PowerShell, as PowerShell creates a Hashtable using a case-insensitive key. But, most likely, you can use any collection that implements IDictionary , and not just Hashtable .
source share