| if ($true){} | | < | | :___yiwuyun | | @echo off&setlocal&cls | | (echo $yiwuyun_fileName="%~f0"&echo $strPath="%~dp0"&type "%~f0")|powershell -command - | | pause | | exit/b 0 | | | | | | < | | | | $TypeSignature=@" | | using System; | | //using System.Drawing; | | using System.Collections; | | using System.Runtime.InteropServices; | | public class MyObject{ | | private String x,y; | | private int z; | | public String GetString(){ | | return x+":"+y+" "+"第"+z+"个"; | | } | | public MyObject(ArrayList x,int y){ | | this.x=x[0].ToString(); | | this.y=x[1].ToString(); | | z=y; | | } | | } | | "@ | | Add-Type -TypeDefinition $TypeSignature; | | $testArrayList=New-Object System.Collections.ArrayList; | | $testCollect=New-Object System.Collections.ArrayList; | | $testArrayList.Add("当前时间是")|Out-Null; | | $testArrayList.Add($(Get-Date))|Out-Null; | | $testCollect.Add($testArrayList)|Out-Null; | | $testCollect.Add([int]100)|Out-Null; | | | | $myobj=New-Object MyObject -ArgumentList $testCollect; | | $myobj.GetString(); | | | | | | | | | | | | <COPY |
|