どうもご無沙汰しております。HIROです。
今回は Add-Type コマンドレットを使用して、 PowerShellでC#のクラス直接利用する方法を紹介します。
Add-Type コマンドレットは V2 から搭載されるもので、他の言語のソースを直接PowerShell上で展開して使用できるようにします。
今回はC#のクラスをPowerShell上で文字列として定義し、利用してみたいと思います。
まずはヒア文字列を使用して変数 $source にC#のSampleClassを代入します。
続きを読む…
Theme design by Jelle Druyts
Pick a theme: BlogXP business calmBlue Candid Blue dasBlog dasblogger DirectionalRedux Discreet Blog Blue Elegante essence Just Html MadsSimple Mobile Mono Movable Radio Blue Movable Radio Heat nautica022 orangeCream Portal Project84 Project84Grass Slate Sound Waves Tricoleur useit.com Voidclass2 BlogXP business calmBlue Candid Blue dasBlog dasblogger DirectionalRedux Discreet Blog Blue Elegante essence Just Html MadsSimple Mobile Mono Movable Radio Blue Movable Radio Heat nautica022 orangeCream Portal Project84 Project84Grass Slate Sound Waves Tricoleur useit.com Voidclass2
Powered by: newtelligence dasBlog 2.0.7226.0
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
© Copyright 2010, HIRO
E-mail