C# static void Main(String[] args) 中参数String[] args 的理解

原文链接:https://blog.csdn.net/weixin_30525825/article/details/95738607

定义一个String[]类型的数组args,表示从命令行传入的参数(类似于Java) ,假如在命令行输入:

1 d:\A.exe a ab abc

  表示在d盘的根目录下执行A.exe 这个可执行文件,传入参数有3个分别是 a ab abc   ,即args[0]="a"  , args[1]="ab" ,args[2]="abc"

posted @   yinghualeihenmei  阅读(51)  评论(0编辑  收藏  举报
相关博文:
阅读排行:
· 分享4款.NET开源、免费、实用的商城系统
· 全程不用写代码,我用AI程序员写了一个飞机大战
· Obsidian + DeepSeek:免费 AI 助力你的知识管理,让你的笔记飞起来!
· MongoDB 8.0这个新功能碉堡了,比商业数据库还牛
· 白话解读 Dapr 1.15:你的「微服务管家」又秀新绝活了
历史上的今天:
2023-10-18 Program does not contain a static 'Main' method suitable for an entry point
2022-10-18 解决 SVN ‘Unable to connect to a repository at URL’
2022-10-18 【SVN Bug】apr does not understand this error code
2022-10-18 svn your working copy appears to be locked run cleanup to amend the situation
2022-10-18 input文本框长度设置
点击右上角即可分享
微信分享提示