Bat执行C#代码器
- 类型:系统工具
- 大小:0.04M
- 平台:WinAll
- 语言:简体中文
- 版本:1.0
- 时间:2022-02-09 13:56
:下面代码不需要修改只需要修改C# Code部分代码实现自己的功能
@echo off
@echo 请确认您的电脑上有.net Framework运行环境,如没有程序将无法正常运行...
title Dos下编写.net代码
set "dnfpath=C:WindowsMicrosoft.NETFramework"
set "est=DO_NOT_ZT_WITHOUT_PERMISSION"
for /f "delims=" %%v in ('dir /ad /b %dnfpath%v?.*') do (
if exist "%dnfpath%%%vcsc.exe" set "cscpath=%dnfpath%%%vcsc.exe"
)
< "%~f0" more +20 > "%cd%tmp.cs"
%cscpath% "/out:%cd%tmp.exe" "%cd%tmp.cs"
del "%cd%tmp.cs"
set /p args="请输入参数:"
tmp.exe %args%
del "%cd%tmp.exe"
goto:eof
:C# Code++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
这里写C#代码...
.....