[Windows Powershell]-学习笔记(2)
数学运算
我们可以把powershell当成一个计算器。如键入命令行那样输入数学表达式,回车,powershell会自动计算并把结果输出。常用的加减乘除模(+,-,*,/,%)运算和小括号表达式都支持。
powershell也能自动识别计算机容量单位,包括KB,MB,GB,TB,PB
Powershell执行外部命令
Powershell能像cmd一样执行外部命令,
如使用netstat –an 查看网络端口连接
使用ipconfig 查看本机ip地址
使用route print查看路由信息
启动控制台CMD,使用exit退出CMD
查看CMD的帮助命令,可以通过/c来接收命令参数(help)
Cmd /c help
启动外部程序,如notepad,但为什么不能启动winword呢,因为winword的路劲未包含在powershell的环境变量里
我们还可以使用&来执行文本命令,如cmd == &"cmd.exe"
Powershell 命令集cmdlets
cmdlets是Powershell的内部命令,cmdlet的类型名为System.Management.Automation.CmdletInfo,包含下列属性和方法:
Name |
MemberType |
Definition |
Equals |
Method |
bool Equals(System.Object obj) |
GetHashCode |
Method |
int GetHashCode() |
GetType |
Method |
type GetType() |
ToString |
Method |
string ToString() |
CommandType |
Property |
System.Management.Automation.CommandTypes CommandType {get;} |
DefaultParameterSet |
Property |
System.String DefaultParameterSet {get;} |
Definition |
Property |
System.String Definition {get;} |
HelpFile |
Property |
System.String HelpFile {get;} |
ImplementingType |
Property |
System.Type ImplementingType {get;} |
Module |
Property |
System.Management.Automation.PSModuleInfo Module {get;} |
ModuleName |
Property |
System.String ModuleName {get;} |
Name |
Property |
System.String Name {get;} |
Noun |
Property |
System.String Noun {get;} |
OutputType |
Property |
System.Collections.ObjectModel.ReadOnlyCollection`1[[System.Management.Automation.PSTypeName, System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]] OutputType {get;} |
Parameters |
Property |
System.Collections.Generic.Dictionary`2[[System.String, mscorlib, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089],[System.Management.Automation.ParameterMetadata, System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]] Parameters {get;} |
ParameterSets |
Property |
System.Collections.ObjectModel.ReadOnlyCollection`1[[System.Management.Automation.CommandParameterSetInfo, System.Management.Automation, Version=1.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35]] ParameterSets {get;} |
PSSnapIn |
Property |
System.Management.Automation.PSSnapInInfo PSSnapIn {get;} |
Verb |
Property |
System.String Verb {get;} |
Visibility |
Property |
System.Management.Automation.SessionStateEntryVisibility Visibility {get;set;} |
DLL |
ScriptProperty |
System.Object DLL {get=$this.ImplementingType.Assembly.Location;} |
HelpUri |
ScriptProperty |
System.Object HelpUri {get=try |
下面是全部的Cmdlets命令
每个命令有一个动词和名词组成,命令的作用一目了然。
Name |
ModuleName |
Help |
Add-Computer |
Microsoft.PowerShell.Management |
|
Add-Content |
Microsoft.PowerShell.Management |
|
Add-History |
Microsoft.PowerShell.Core |
|
Add-Member |
Microsoft.PowerShell.Utility |
|
Add-PSSnapin |
Microsoft.PowerShell.Core |
|
Add-Type |
Microsoft.PowerShell.Utility |
|
Checkpoint-Computer |
Microsoft.PowerShell.Management |
|
Clear-Content |
Microsoft.PowerShell.Management |
|
Clear-EventLog |
Microsoft.PowerShell.Management |
|
Clear-History |
Microsoft.PowerShell.Core |
|
Clear-Item |
Microsoft.PowerShell.Management |
|
Clear-ItemProperty |
Microsoft.PowerShell.Management |
|
Clear-Variable |
Microsoft.PowerShell.Utility |
|
Compare-Object |
Microsoft.PowerShell.Utility |
|
Complete-Transaction |
Microsoft.PowerShell.Management |
|
Connect-WSMan |
Microsoft.WSMan.Management |
|
ConvertFrom-Csv |
Microsoft.PowerShell.Utility |
|
ConvertFrom-SecureString |
Microsoft.PowerShell.Security |
|
ConvertFrom-StringData |
Microsoft.PowerShell.Utility |
|
Convert-Path |
Microsoft.PowerShell.Management |
|
ConvertTo-Csv |
Microsoft.PowerShell.Utility |
|
ConvertTo-Html |
Microsoft.PowerShell.Utility |
|
ConvertTo-SecureString |
Microsoft.PowerShell.Security |
|
ConvertTo-Xml |
Microsoft.PowerShell.Utility |
|
Copy-Item |
Microsoft.PowerShell.Management |
|
Copy-ItemProperty |
Microsoft.PowerShell.Management |
|
Debug-Process |
Microsoft.PowerShell.Management |
|
Disable-ComputerRestore |
Microsoft.PowerShell.Management |
|
Disable-PSBreakpoint |
Microsoft.PowerShell.Utility |
|
Disable-PSSessionConfiguration |
Microsoft.PowerShell.Core |
|
Disable-WSManCredSSP |
Microsoft.WSMan.Management |
|
Disconnect-WSMan |
Microsoft.WSMan.Management |
|
Enable-ComputerRestore |
Microsoft.PowerShell.Management |
|
Enable-PSBreakpoint |
Microsoft.PowerShell.Utility |
|
Enable-PSRemoting |
Microsoft.PowerShell.Core |
|
Enable-PSSessionConfiguration |
Microsoft.PowerShell.Core |
|
Enable-WSManCredSSP |
Microsoft.WSMan.Management |
|
Enter-PSSession |
Microsoft.PowerShell.Core |
|
Exit-PSSession |
Microsoft.PowerShell.Core |
|
Export-Alias |
Microsoft.PowerShell.Utility |
|
Export-Clixml |
Microsoft.PowerShell.Utility |
|
Export-Console |
Microsoft.PowerShell.Core |
|
Export-Counter |
Microsoft.PowerShell.Diagnostics |
|
Export-Csv |
Microsoft.PowerShell.Utility |
|
Export-FormatData |
Microsoft.PowerShell.Utility |
|
Export-ModuleMember |
Microsoft.PowerShell.Core |
|
Export-PSSession |
Microsoft.PowerShell.Utility |
|
ForEach-Object |
Microsoft.PowerShell.Core |
|
Format-Custom |
Microsoft.PowerShell.Utility |
|
Format-List |
Microsoft.PowerShell.Utility |
|
Format-Table |
Microsoft.PowerShell.Utility |
|
Format-Wide |
Microsoft.PowerShell.Utility |
|
Get-Acl |
Microsoft.PowerShell.Security |
|
Get-Alias |
Microsoft.PowerShell.Utility |
|
Get-AuthenticodeSignature |
Microsoft.PowerShell.Security |
|
Get-ChildItem |
Microsoft.PowerShell.Management |
|
Get-Command |
Microsoft.PowerShell.Core |
|
Get-ComputerRestorePoint |
Microsoft.PowerShell.Management |
|
Get-Content |
Microsoft.PowerShell.Management |
|
Get-Counter |
Microsoft.PowerShell.Diagnostics |
|
Get-Credential |
Microsoft.PowerShell.Security |
|
Get-Culture |
Microsoft.PowerShell.Utility |
|
Get-Date |
Microsoft.PowerShell.Utility |
|
Get-Event |
Microsoft.PowerShell.Utility |
|
Get-EventLog |
Microsoft.PowerShell.Management |
|
Get-EventSubscriber |
Microsoft.PowerShell.Utility |
|
Get-ExecutionPolicy |
Microsoft.PowerShell.Security |
|
Get-FormatData |
Microsoft.PowerShell.Utility |
|
Get-Help |
Microsoft.PowerShell.Core |
|
Get-History |
Microsoft.PowerShell.Core |
|
Get-Host |
Microsoft.PowerShell.Utility |
|
Get-HotFix |
Microsoft.PowerShell.Management |
|
Get-Item |
Microsoft.PowerShell.Management |
|
Get-ItemProperty |
Microsoft.PowerShell.Management |
|
Get-Job |
Microsoft.PowerShell.Core |
|
Get-Location |
Microsoft.PowerShell.Management |
|
Get-Member |
Microsoft.PowerShell.Utility |
|
Get-Module |
Microsoft.PowerShell.Core |
|
Get-PfxCertificate |
Microsoft.PowerShell.Security |
|
Get-Process |
Microsoft.PowerShell.Management |
|
Get-PSBreakpoint |
Microsoft.PowerShell.Utility |
|
Get-PSCallStack |
Microsoft.PowerShell.Utility |
|
Get-PSDrive |
Microsoft.PowerShell.Management |
|
Get-PSProvider |
Microsoft.PowerShell.Management |
|
Get-PSSession |
Microsoft.PowerShell.Core |
|
Get-PSSessionConfiguration |
Microsoft.PowerShell.Core |
|
Get-PSSnapin |
Microsoft.PowerShell.Core |
|
Get-Random |
Microsoft.PowerShell.Utility |
|
Get-Service |
Microsoft.PowerShell.Management |
|
Get-TraceSource |
Microsoft.PowerShell.Utility |
|
Get-Transaction |
Microsoft.PowerShell.Management |
|
Get-UICulture |
Microsoft.PowerShell.Utility |
|
Get-Unique |
Microsoft.PowerShell.Utility |
|
Get-Variable |
Microsoft.PowerShell.Utility |
|
Get-WinEvent |
Microsoft.PowerShell.Diagnostics |
|
Get-WmiObject |
Microsoft.PowerShell.Management |
|
Get-WSManCredSSP |
Microsoft.WSMan.Management |
|
Get-WSManInstance |
Microsoft.WSMan.Management |
|
Group-Object |
Microsoft.PowerShell.Utility |
|
Import-Alias |
Microsoft.PowerShell.Utility |
|
Import-Clixml |
Microsoft.PowerShell.Utility |
|
Import-Counter |
Microsoft.PowerShell.Diagnostics |
|
Import-Csv |
Microsoft.PowerShell.Utility |
|
Import-LocalizedData |
Microsoft.PowerShell.Utility |
|
Import-Module |
Microsoft.PowerShell.Core |
|
Import-PSSession |
Microsoft.PowerShell.Utility |
|
Invoke-Command |
Microsoft.PowerShell.Core |
|
Invoke-Expression |
Microsoft.PowerShell.Utility |
|
Invoke-History |
Microsoft.PowerShell.Core |
|
Invoke-Item |
Microsoft.PowerShell.Management |
|
Invoke-WmiMethod |
Microsoft.PowerShell.Management |
|
Invoke-WSManAction |
Microsoft.WSMan.Management |
|
Join-Path |
Microsoft.PowerShell.Management |
|
Limit-EventLog |
Microsoft.PowerShell.Management |
|
Measure-Command |
Microsoft.PowerShell.Utility |
|
Measure-Object |
Microsoft.PowerShell.Utility |
|
Move-Item |
Microsoft.PowerShell.Management |
|
Move-ItemProperty |
Microsoft.PowerShell.Management |
|
New-Alias |
Microsoft.PowerShell.Utility |
|
New-Event |
Microsoft.PowerShell.Utility |
|
New-EventLog |
Microsoft.PowerShell.Management |
|
New-Item |
Microsoft.PowerShell.Management |
|
New-ItemProperty |
Microsoft.PowerShell.Management |
|
New-Module |
Microsoft.PowerShell.Core |
|
New-ModuleManifest |
Microsoft.PowerShell.Core |
|
New-Object |
Microsoft.PowerShell.Utility |
|
New-PSDrive |
Microsoft.PowerShell.Management |
|
New-PSSession |
Microsoft.PowerShell.Core |
|
New-PSSessionOption |
Microsoft.PowerShell.Core |
|
New-Service |
Microsoft.PowerShell.Management |
|
New-TimeSpan |
Microsoft.PowerShell.Utility |
|
New-Variable |
Microsoft.PowerShell.Utility |
|
New-WebServiceProxy |
Microsoft.PowerShell.Management |
|
New-WSManInstance |
Microsoft.WSMan.Management |
|
New-WSManSessionOption |
Microsoft.WSMan.Management |
|
Out-Default |
Microsoft.PowerShell.Utility |
|
Out-File |
Microsoft.PowerShell.Utility |
|
Out-GridView |
Microsoft.PowerShell.Utility |
|
Out-Host |
Microsoft.PowerShell.Utility |
|
Out-Null |
Microsoft.PowerShell.Utility |
|
Out-Printer |
Microsoft.PowerShell.Utility |
|
Out-String |
Microsoft.PowerShell.Utility |
|
Pop-Location |
Microsoft.PowerShell.Management |
|
Push-Location |
Microsoft.PowerShell.Management |
|
Read-Host |
Microsoft.PowerShell.Utility |
|
Receive-Job |
Microsoft.PowerShell.Core |
|
Register-EngineEvent |
Microsoft.PowerShell.Utility |
|
Register-ObjectEvent |
Microsoft.PowerShell.Utility |
|
Register-PSSessionConfiguration |
Microsoft.PowerShell.Core |
|
Register-WmiEvent |
Microsoft.PowerShell.Management |
|
Remove-Computer |
Microsoft.PowerShell.Management |
|
Remove-Event |
Microsoft.PowerShell.Utility |
|
Remove-EventLog |
Microsoft.PowerShell.Management |
|
Remove-Item |
Microsoft.PowerShell.Management |
|
Remove-ItemProperty |
Microsoft.PowerShell.Management |
|
Remove-Job |
Microsoft.PowerShell.Core |
|
Remove-Module |
Microsoft.PowerShell.Core |
|
Remove-PSBreakpoint |
Microsoft.PowerShell.Utility |
|
Remove-PSDrive |
Microsoft.PowerShell.Management |
|
Remove-PSSession |
Microsoft.PowerShell.Core |
|
Remove-PSSnapin |
Microsoft.PowerShell.Core |
|
Remove-Variable |
Microsoft.PowerShell.Utility |
|
Remove-WmiObject |
Microsoft.PowerShell.Management |
|
Remove-WSManInstance |
Microsoft.WSMan.Management |
|
Rename-Item |
Microsoft.PowerShell.Management |
|
Rename-ItemProperty |
Microsoft.PowerShell.Management |
|
Reset-ComputerMachinePassword |
Microsoft.PowerShell.Management |
|
Resolve-Path |
Microsoft.PowerShell.Management |
|
Restart-Computer |
Microsoft.PowerShell.Management |
|
Restart-Service |
Microsoft.PowerShell.Management |
|
Restore-Computer |
Microsoft.PowerShell.Management |
|
Resume-Service |
Microsoft.PowerShell.Management |
|
Select-Object |
Microsoft.PowerShell.Utility |
|
Select-String |
Microsoft.PowerShell.Utility |
|
Select-Xml |
Microsoft.PowerShell.Utility |
|
Send-MailMessage |
Microsoft.PowerShell.Utility |
|
Set-Acl |
Microsoft.PowerShell.Security |
|
Set-Alias |
Microsoft.PowerShell.Utility |
|
Set-AuthenticodeSignature |
Microsoft.PowerShell.Security |
|
Set-Content |
Microsoft.PowerShell.Management |
|
Set-Date |
Microsoft.PowerShell.Utility |
|
Set-ExecutionPolicy |
Microsoft.PowerShell.Security |
|
Set-Item |
Microsoft.PowerShell.Management |
|
Set-ItemProperty |
Microsoft.PowerShell.Management |
|
Set-Location |
Microsoft.PowerShell.Management |
|
Set-PSBreakpoint |
Microsoft.PowerShell.Utility |
|
Set-PSDebug |
Microsoft.PowerShell.Core |
|
Set-PSSessionConfiguration |
Microsoft.PowerShell.Core |
|
Set-Service |
Microsoft.PowerShell.Management |
|
Set-StrictMode |
Microsoft.PowerShell.Core |
|
Set-TraceSource |
Microsoft.PowerShell.Utility |
|
Set-Variable |
Microsoft.PowerShell.Utility |
|
Set-WmiInstance |
Microsoft.PowerShell.Management |
|
Set-WSManInstance |
Microsoft.WSMan.Management |
|
Set-WSManQuickConfig |
Microsoft.WSMan.Management |
|
Show-EventLog |
Microsoft.PowerShell.Management |
|
Sort-Object |
Microsoft.PowerShell.Utility |
|
Split-Path |
Microsoft.PowerShell.Management |
|
Start-Job |
Microsoft.PowerShell.Core |
|
Start-Process |
Microsoft.PowerShell.Management |
|
Start-Service |
Microsoft.PowerShell.Management |
|
Start-Sleep |
Microsoft.PowerShell.Utility |
|
Start-Transaction |
Microsoft.PowerShell.Management |
|
Start-Transcript |
Microsoft.PowerShell.Host |
|
Stop-Computer |
Microsoft.PowerShell.Management |
|
Stop-Job |
Microsoft.PowerShell.Core |
|
Stop-Process |
Microsoft.PowerShell.Management |
|
Stop-Service |
Microsoft.PowerShell.Management |
|
Stop-Transcript |
Microsoft.PowerShell.Host |
|
Suspend-Service |
Microsoft.PowerShell.Management |
|
Tee-Object |
Microsoft.PowerShell.Utility |
|
Test-ComputerSecureChannel |
Microsoft.PowerShell.Management |
|
Test-Connection |
Microsoft.PowerShell.Management |
|
Test-ModuleManifest |
Microsoft.PowerShell.Core |
|
Test-Path |
Microsoft.PowerShell.Management |
|
Test-WSMan |
Microsoft.WSMan.Management |
|
Trace-Command |
Microsoft.PowerShell.Utility |
|
Undo-Transaction |
Microsoft.PowerShell.Management |
|
Unregister-Event |
Microsoft.PowerShell.Utility |
|
Unregister-PSSessionConfiguration |
Microsoft.PowerShell.Core |
|
Update-FormatData |
Microsoft.PowerShell.Utility |
|
Update-List |
Microsoft.PowerShell.Utility |
|
Update-TypeData |
Microsoft.PowerShell.Utility |
|
Use-Transaction |
Microsoft.PowerShell.Management |
|
Wait-Event |
Microsoft.PowerShell.Utility |
|
Wait-Job |
Microsoft.PowerShell.Core |
|
Wait-Process |
Microsoft.PowerShell.Management |
|
Where-Object |
Microsoft.PowerShell.Core |
|
Write-Debug |
Microsoft.PowerShell.Utility |
|
Write-Error |
Microsoft.PowerShell.Utility |
|
Write-EventLog |
Microsoft.PowerShell.Management |
|
Write-Host |
Microsoft.PowerShell.Utility |
|
Write-Output |
Microsoft.PowerShell.Utility |
|
Write-Progress |
Microsoft.PowerShell.Utility |
|
Write-Verbose |
Microsoft.PowerShell.Utility |
|
Write-Warning |
Microsoft.PowerShell.Utility |
Powershell别名
cmdlet 的名称由一个动词和一个名词组成,其功能对用户来讲一目了然。但是对于一个经常使用powershell命令的人每天敲那么多命令也很麻烦啊。能不能把命令缩短一点呢?于是"别名"就应运而生了。Powershell内部也实现了很多常用命令的别名。例如Get-ChildItem,列出当前的子文件或目录。它有两个别名:ls 和 dir,这两个别名来源于unix 的shell和windows的cmd。
因此别名有两个作用:
- 继承:继承unix-shell和windows-cmd。
- 方便:方便用户使用。
处理别名:
查询别名所指的真实cmdlet命令。
查看可用别名
查看可用的别名,可以通过" ls alias:" 或者 "Get-Alias"
如何查看所有以Remove打头的cmdlet的命令的别名呢?
说明:dir alias:获取的是别名的数组,通过where对数组元素进行遍历,$_代表当前元素,alias的Definition为String类型,因为powershell支持.net,.net中的string类有一个方法Startswith。通过where过滤集合在powershell中使用非常广泛。
有的cmdlet命令可能有2-3个别名,我们可以通过下面的命令查看所有别名和指向cmdlet的别名的个数。
创建自己的别名
给记事本创建一个别名,并查看别名
删除别名 del alias:edit
Import-alias导入别名
Export-alias导出别名
[Windows Powershell]-学习笔记(2)的更多相关文章
- [Windows Powershell]-学习笔记(5)
Powershell自动化变量 Powershell 自动化变量 是那些一旦打开Powershell就会自动加载的变量,或者说是运行是变量. 这些变量一般存放的内容包括 用户信息:例如用户的根目录$h ...
- [Windows Powershell]-学习笔记(6)
Powershell环境变量 传统的控制台一般没有象Powershell这么高级的变量系统.它们都是依赖于机器本身的环境变量,进行操作 .环境变量对于powershell显得很重要,因为它涵盖了许多操 ...
- [Windows Powershell]-学习笔记(4)
Powershell 定义变量 在powershell中变量名均是以美元符"$"开始,剩余字符可以是数字.字母.下划线的任意字符,并且powershell变量名大小写不敏感($a和 ...
- [Windows Powershell]-学习笔记(3)
Powershell 通过函数扩展别名 在powershell中设置别名的确方便快捷,但是在设置别名的过程中并设置参数的相关信息,尽管别名会自动识别参数,但是如何把经常使用的参数默认设定在别名里面呢? ...
- [Windows Powershell]-学习笔记(1)
Powershell 快捷键 Powershell的快捷键和cmd,linux中的shell,都比较像. ALT+F7 清除命令的历史记录 PgUp PgDn 显示当前会话的第 ...
- Windows PowerShell 学习之——Cmdlet处理生命周期
这一次介绍一下Cmdlet处理过程的生命周期 总共分为六个部分 1.概述 2. 命令行输入绑定参数(parameters) 3. 开始指令处理 4. 接受管道输入绑定参数 5. 处理记录 6. 处理记 ...
- Powershell学习笔记:(二)、基础知识
从Window7以后,WIndows系统都自带了Windows PowerShell. 自带版本如下 WIndow7 2.0 WIndow8 3.0 Window8.1 4.0 Win ...
- Powershell学习笔记:(一)、初识Powershell
什么是Powershell? MSDN上的说明是:PowerShell 是构建于 .NET 上基于任务的命令行 shell 和脚本语言. PowerShell 可帮助系统管理员和高级用户快速自动执行用 ...
- windows powershell学习
PowerShell,从名字可以知道,他首先是一个shell,shell的意思就是和Linux的bash等一样.和原来的cmd一样就是在里边敲命令(可执行文件)使用: 而Power就意味他是一个功能强 ...
随机推荐
- thinkPHP 上传文件的中文乱码
最新版本~用了里面的上传文件类,发现在保存文件原本名称的时候当有中文名的时候保存文件会显示乱码,看了下源代码发现在Tp上传驱动那里有点问题. // if (!move_uploaded_file($f ...
- android最新版 极光推送
极光推送对于移动开发的程序员都不陌生,用起来也挺方便的,今天在这里给大家介绍下最先版的极光推送的用法,超级简单. 1.在build.gradle里面添加两个方法并引用一个库文件 1.1在default ...
- cocos2dx游戏--三国关羽传【角色扮演类】Demo的制作及实现
项目地址:https://github.com/moonlightpoet/GuanYuZhuan 主要类及其对应效果: MainScene:菜单界面(用于选择不同剧本) StoryScene:故事界 ...
- HDU 5900 QSC and Master
题目链接:传送门 题目大意:长度为n的key数组与value数组,若相邻的key互斥,则可以删去这两个数同时获得对应的两 个value值,问最多能获得多少 题目思路:区间DP 闲谈: 这个题一开始没有 ...
- GIF动画录制工具(写教程时用的比较小巧的gif工具)
1 软件小巧实用,只有1m 2 gif效果还可以 3 绿色,无需安装 很多地方能下载,百度就行. 下载地址: http://www.downxia.com/downinfo/41427.html
- 【BZOJ3120】Line 矩阵乘法
[BZOJ3120]Line Description Wayne喜欢排队……不对,是Wayne所在学校的校长喜欢看大家排队,尤其是在操场上站方阵.某日课间操时,校长童心大发想了一个极具观赏性的列队方案 ...
- document.selection window.getSelection()
IE9以下支持:document.selection IE9.Firefox.Safari.Chrome和Opera支持:window.getSelection() 屏幕取词 function ge ...
- freenas 11.2踩过的坑
修改SMB最小协议 服务器最小协议由FreeNAS上的sysctl控制. 在System-> Tunables 下添加sysctl来使其永久化:Variable = freenas.servic ...
- Myeclipse中js总是报错
1.右键选择 MyEclipse-->Exclude From Validation .2.再右键选择 MyEclipse-->Run Validation 即可.
- 3、二、c# 面向对像编程。类,结构、C# 数据类型(引用类型、值 类型、指针类型)、ref参数与out参数、方法的重载、静态类型与静态成员、继承与多态、委托与事件
一.类 定义类使用class关键字. <access specifier> class class_name { // member variables 成员变量 <access s ...