资源简介
自动属性:
类的继承:
主程序运行:
代码片段和文件信息
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
namespace ServiceProvider
{
public interface MyInter { }
//where 用于类的泛型参数
public class ClassDiversify where TKey : IComparable IEnumerable new() where TValue : MyInter new()
{
TKey key = new TKey();
TValue value = new TValue();
}
//嵌套类 可访问 基类私有成员
public class A
{
private int svalue = 111;
public class B : A
{
public void GetValue()
{
Console.WriteLine($“this value is:{this.svalue}“);
}
}
}
//private 只本类或嵌套类可访问
//protect 本类或派生类可访问
//internal 同个程序集可访问
//public 所有访问
//类的重写
public class Father
{
public virtual void Method()
{
Console.WriteLine(“This is Father base Class“);
}
}
public class Children : Father
{
public override void Method()
{
Console.WriteLine(“This is Children method override “);
}
}
public class Automobile
{
public Automobile(string make string model int year)
{
if (make == null)
throw new ArgumentNullException(“The make cannot be null.“);
else if (String.IsNullOrWhiteSpace(make))
throw new ArgumentException(“make cannot be an empty string or have space characters only.“);
Make = make;
if (model == null)
throw new ArgumentNullException(“The model cannot be null.“);
else if (String.IsNullOrWhiteSpace(model))
throw new ArgumentException(“model cannot be an empty string or have space characters only.“);
Model = model;
if (year < 1857 || year > DateTime.Now.Year + 2)
throw new ArgumentException(“The year is out of range.“);
Year = year;
}
public string Make { get; }
public string Model { get; }
public int Year { get; }
public override string ToString() => $“{Year} {Make} {Model}“;
}
///
/// 实列 出版物基类
///
public enum PublicationType { Misc Book Magazine Article };
public abstract class Publication
{
private bool published = false;
private DateTime datePublished;
private int totalPages;
public Publication(string title string publisher PublicationType type)
{
if (String.IsNullOrWhiteSpace(publisher))
throw new ArgumentException(“The publisher is required.“);
Publisher = publisher;
if (String.IsNullOrWhiteSpace(title))
throw new ArgumentException(“The title is required.“);
title = title;
Type = type;
}
pu
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 231838 2020-08-18 18:29 ServiceProvider\.vs\ServiceProvider\DesignTimeBuild\.dtbcache
..A..H. 27648 2020-08-19 16:50 ServiceProvider\.vs\ServiceProvider\v16\.suo
文件 0 2020-08-17 16:40 ServiceProvider\.vs\ServiceProvider\v16\Server\sqlite3\db.lock
文件 696320 2020-08-19 16:50 ServiceProvider\.vs\ServiceProvider\v16\Server\sqlite3\storage.ide
文件 37760 2020-07-22 00:42 ServiceProvider\ServiceProvider\bin\Debug\netcoreapp3.1\Microsoft.Extensions.DependencyInjection.Abstractions.dll
文件 72576 2020-07-22 00:41 ServiceProvider\ServiceProvider\bin\Debug\netcoreapp3.1\Microsoft.Extensions.DependencyInjection.dll
文件 2048 2020-08-17 17:40 ServiceProvider\ServiceProvider\bin\Debug\netcoreapp3.1\ServiceProvider.deps.json
文件 13824 2020-08-19 16:46 ServiceProvider\ServiceProvider\bin\Debug\netcoreapp3.1\ServiceProvider.dll
文件 169984 2020-08-19 16:46 ServiceProvider\ServiceProvider\bin\Debug\netcoreapp3.1\ServiceProvider.exe
文件 3644 2020-08-19 16:46 ServiceProvider\ServiceProvider\bin\Debug\netcoreapp3.1\ServiceProvider.pdb
文件 238 2020-08-17 17:40 ServiceProvider\ServiceProvider\bin\Debug\netcoreapp3.1\ServiceProvider.runtimeconfig.dev.json
文件 154 2020-08-17 17:40 ServiceProvider\ServiceProvider\bin\Debug\netcoreapp3.1\ServiceProvider.runtimeconfig.json
文件 7101 2020-08-19 16:44 ServiceProvider\ServiceProvider\ClassDiversify.cs
文件 803 2020-08-17 17:45 ServiceProvider\ServiceProvider\interfaceprovider.cs
文件 1028 2020-08-17 16:40 ServiceProvider\ServiceProvider\obj\Debug\netcoreapp3.1\ServiceProvider.AssemblyInfo.cs
文件 42 2020-08-17 16:40 ServiceProvider\ServiceProvider\obj\Debug\netcoreapp3.1\ServiceProvider.AssemblyInfoInputs.cache
文件 1618 2020-08-17 16:45 ServiceProvider\ServiceProvider\obj\Debug\netcoreapp3.1\ServiceProvider.assets.cache
文件 0 2020-08-19 16:46 ServiceProvider\ServiceProvider\obj\Debug\netcoreapp3.1\ServiceProvider.csproj.CopyComplete
文件 1578 2020-08-18 11:30 ServiceProvider\ServiceProvider\obj\Debug\netcoreapp3.1\ServiceProvider.csproj.FileListAbsolute.txt
文件 424 2020-08-19 16:46 ServiceProvider\ServiceProvider\obj\Debug\netcoreapp3.1\ServiceProvider.csprojAssemblyReference.cache
文件 13824 2020-08-19 16:46 ServiceProvider\ServiceProvider\obj\Debug\netcoreapp3.1\ServiceProvider.dll
文件 169984 2020-08-19 16:46 ServiceProvider\ServiceProvider\obj\Debug\netcoreapp3.1\ServiceProvider.exe
文件 3644 2020-08-19 16:46 ServiceProvider\ServiceProvider\obj\Debug\netcoreapp3.1\ServiceProvider.pdb
文件 4975 2020-08-17 16:45 ServiceProvider\ServiceProvider\obj\project.assets.json
文件 149 2020-08-17 16:45 ServiceProvider\ServiceProvider\obj\ServiceProvider.csproj.nuget.cache
文件 2316 2020-08-17 16:45 ServiceProvider\ServiceProvider\obj\ServiceProvider.csproj.nuget.dgspec.json
文件 1167 2020-08-17 16:40 ServiceProvider\ServiceProvider\obj\ServiceProvider.csproj.nuget.g.props
文件 294 2020-08-17 16:40 ServiceProvider\ServiceProvider\obj\ServiceProvider.csproj.nuget.g.targets
文件 3877 2020-08-19 16:46 ServiceProvider\ServiceProvider\Program.cs
文件 1310 2020-08-18 16:40 ServiceProvider\ServiceProvider\property.cs
............此处省略19个文件信息
- 上一篇:读取GY-25倾斜度模块数据
- 下一篇:modbus tcp 调试
相关资源
- 快递接口(C#源码以及文档)
- C# 斑马打印机USB接口ZPL条码打印
- C#调用USB接口斑马打印机
- C#编写ActiveX控件(纯接口,无界面)
- C#接口框架技术文档V1.2
- asp.net 微信支付V3.7完整可用代码和文
- pi数据库采集程序
- .NET C# API对应的SDK WxPayAPI_CS_v3 调试通
- C# PayPal国际支付接口实现源码DEMO-20
- 金旭亮《C#面向对象程序设计》教案
- ASP.NET微信支付接口调用Demo JSAPI
- 微信现金红包asp.net c#源码支付接口
- c#(vs2017)阿里云语音识别接口demo
- .net/C#支付宝接口加详细文档
- 钉钉接口请求数据接入数据库c#源码
- C#抓取123026火车票,2017年接口,以及
- 万得Wind量化接口 C#(PPT和代码)
- 股票数据接口库NTuShare
- asp.net微信支付接口代码
- TradeX.dll C# 接口演示程序
- C# MVC 支付宝商户转账即时到账源码个
- c# 微信接口,包括小程序,企业微信
- C# 2015开发微信支付统一下单接口,
- c# 调取微信扫一扫接口v1.1版本
- c# 调取微信扫一扫接口
- CSharpGL.zip
- asp.net 源码:微信公众号接口,微信企
- C# 实现微信公众平台接口消息收发D
- 考勤机SDK二次开发包接口
- ArcEngine+C#缓冲区分析(GP工具+ITopolo
评论
共有 条评论