C# 教程 | 菜鸟教程

  • http://www.runoob.com/csharp/csharp-tutorial.html

.NET API Browser | Microsoft Docs

  • https://docs.microsoft.com/en-gb/dotnet/api/index?view=netcore-2.0

$ (C# Reference) | Microsoft Docs

  • https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/tokens/interpolated
  • Identifies a string literal as an interpolated string. An interpolated string is a template-like string that contains literal text along with interpolated expressions. When the interpolated string is resolved, for example in an assignment statement or a method call, its interpolated expressions are replaced by their string representations in the result string. Interpolated strings are replacements for the composite format strings supported by the .NET Framework.
  • c# - What does $ mean before a string? - Stack Overflow
    • https://stackoverflow.com/questions/31014869/what-does-mean-before-a-string

=> Operator (C# Reference) | Microsoft Docs

  • https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/lambda-operator
  • The => operator can be used in two ways in C#:

#region (C# Reference) | Microsoft Docs

  • https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/preprocessor-directives/preprocessor-region
  • #region lets you specify a block of code that you can expand or collapse when using the outlining feature of the Visual Studio Code Editor. In longer code files, it is convenient to be able to collapse or hide one or more regions so that you can focus on the part of the file that you are currently working on.

Application startup in ASP.NET Core | Microsoft Docs

  • https://docs.microsoft.com/en-us/aspnet/core/fundamentals/startup
  • The Startup class configures services and the app's request pipeline.

async (C# Reference) | Microsoft Docs

  • https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/async
  • Use the async modifier to specify that a method, lambda expression, or anonymous method is asynchronous. If you use this modifier on a method or expression, it's referred to as an async method.

await (C# Reference) | Microsoft Docs

  • https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/await
  • The await operator is applied to a task in an asynchronous method to insert a suspension point in the execution of the method until the awaited task completes. The task represents ongoing work.
  • await can only be used in an asynchronous method modified by the async keyword. Such a method, defined by using the async modifier and usually containing one or more await expressions, is referred to as an async method.

Enumerable.Select Method (System.Linq) | Microsoft Docs

  • https://docs.microsoft.com/en-gb/dotnet/api/system.linq.enumerable.select?view=netcore-2.0#System_Linq_Enumerable_Select__2_System_Collections_Generic_IEnumerable___0__System_Func___0___1__
  • Projects each element of a sequence into a new form.

FromBodyAttribute Class (Microsoft.AspNetCore.Mvc) | Microsoft Docs

  • https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.frombodyattribute?view=aspnetcore-2.0
  • Specifies that a parameter or property should be bound using the request body.

get (C# Reference) | Microsoft Docs

  • https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/get
  • The get keyword defines an accessor method in a property or indexer that returns the property value or the indexer element.
  • Auto-Implemented Properties (C# Programming Guide) | Microsoft Docs
    • https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/auto-implemented-properties
    • In C# 3.0 and later, auto-implemented properties make property-declaration more concise when no additional logic is required in the property accessors. They also enable client code to create objects. When you declare a property as shown in the following example, the compiler creates a private, anonymous backing field that can only be accessed through the property's get and set accessors.
  • How to: Implement a Lightweight Class with Auto-Implemented Properties (C# Programming Guide) | Microsoft Docs
    • https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/classes-and-structs/how-to-implement-a-lightweight-class-with-auto-implemented-properties
    • This example shows how to create an immutable lightweight class that serves only to encapsulate a set of auto-implemented properties. Use this kind of construct instead of a struct when you must use reference type semantics.
    • You can make an immutable property in two ways. You can declare the set accessor.to be private. The property is only settable within the type, but it is immutable to consumers. You can instead declare only the get accessor, which makes the property immutable everywhere except in the type’s constructor.1
    • When you declare a private set accessor, you cannot use an object initializer to initialize the property. You must use a constructor or a factory method.

Guid Struct (System) | Microsoft Docs

  • https://docs.microsoft.com/en-gb/dotnet/api/system.guid?view=netcore-2.0
  • Represents a globally unique identifier (GUID).

HttpClient Class (System.Net.Http) | Microsoft Docs

  • https://docs.microsoft.com/en-gb/dotnet/api/system.net.http.httpclient?view=netcore-2.0
  • Provides a base class for sending HTTP requests and receiving HTTP responses from a resource identified by a URI.

HttpGetAttribute Class (Microsoft.AspNetCore.Mvc) | Microsoft Docs

  • https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.httpgetattribute?view=aspnetcore-2.0
  • Identifies an action that only supports the HTTP GET method.
  • HttpPostAttribute Class (Microsoft.AspNetCore.Mvc) | Microsoft Docs
    • https://docs.microsoft.com/en-us/dotnet/api/microsoft.aspnetcore.mvc.httppostattribute?view=aspnetcore-2.0
    • Identifies an action that only supports the HTTP POST method.
  • HTTP Methods GET vs POST
    • https://www.w3schools.com/tags/ref_httpmethods.asp
    • The two most used HTTP methods are: GET and POST.

Language-Integrated Query (LINQ) (C#) | Microsoft Docs

  • https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/concepts/linq/
  • Language-Integrated Query (LINQ) is the name for a set of technologies based on the integration of query capabilities directly into the C# language. Traditionally, queries against data are expressed as simple strings without type checking at compile time or IntelliSense support. Furthermore, you have to learn a different query language for each type of data source: SQL databases, XML documents, various Web services, and so on. With LINQ, a query is a first-class language construct, just like classes, methods, events.

readonly (C# Reference) | Microsoft Docs

  • https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/readonly
  • The readonly keyword is a modifier that you can use on fields. When a field declaration includes a readonly modifier, assignments to the fields introduced by the declaration can only occur as part of the declaration or in a constructor in the same class.
  • The readonly keyword is different from the const keyword. A const field can only be initialized at the declaration of the field. A readonlyfield can be initialized either at the declaration or in a constructor. Therefore, readonly fields can have different values depending on the constructor used. Also, while a const field is a compile-time constant, the readonly field can be used for runtime constants as in the following example : public static readonly uint timeStamp = (uint)DateTime.Now.Ticks;

String.IsNullOrEmpty(String) Method (System) | Microsoft Docs

  • https://docs.microsoft.com/en-gb/dotnet/api/system.string.isnullorempty?view=netcore-2.0#System_String_IsNullOrEmpty_System_String_
  • Indicates whether the specified string is null or an Empty string.

Task<TResult> Class (System.Threading.Tasks) | Microsoft Docs

  • https://docs.microsoft.com/en-gb/dotnet/api/system.threading.tasks.task-1?view=netcore-2.0
  • Represents an asynchronous operation that can return a value.
  • Task<TResult>.Result Property (System.Threading.Tasks) | Microsoft Docs
    • https://docs.microsoft.com/en-gb/dotnet/api/system.threading.tasks.task-1.result?view=netcore-2.0#System_Threading_Tasks_Task_1_Result
    • Gets the result value of this Task<TResult>.
  • Task.Status Property (System.Threading.Tasks) | Microsoft Docs
    • https://docs.microsoft.com/en-gb/dotnet/api/system.threading.tasks.task.status?view=netcore-2.0#System_Threading_Tasks_Task_Status
    • Gets the TaskStatus of this task.
  • Task-based Asynchronous Pattern (TAP) | Microsoft Docs
    • https://docs.microsoft.com/en-gb/dotnet/standard/asynchronous-programming-patterns/task-based-asynchronous-pattern-tap?view=netcore-2.0
    • The Task-based Asynchronous Pattern (TAP) is based on the System.Threading.Tasks.Task and System.Threading.Tasks.Task<TResult> types in the System.Threading.Tasks namespace, which are used to represent arbitrary asynchronous operations. TAP is the recommended asynchronous design pattern for new development.

Using Nullable Types (C# Programming Guide) | Microsoft Docs

  • https://docs.microsoft.com/en-us/dotnet/csharp/programming-guide/nullable-types/using-nullable-types
  • Nullable types can represent all the values of an underlying type, and an additional null value.
  • Nullable types are declared in one of two ways: T is the underlying type of the nullable type. T can be any value type including struct; it cannot be a reference type.
    • System.Nullable<T> variable

    • T? variable

  • ?? Operator (C# Reference) | Microsoft Docs
    • https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/operators/null-conditional-operator
    • The ?? operator is called the null-coalescing operator. It returns the left-hand operand if the operand is not null; otherwise it returns the right hand operand.

var (C# Reference) | Microsoft Docs

  • https://docs.microsoft.com/en-us/dotnet/csharp/language-reference/keywords/var
  • Beginning in Visual C# 3.0, variables that are declared at method scope can have an implicit "type" var. An implicitly typed local variable is strongly typed just as if you had declared the type yourself, but the compiler determines the type.

学习笔记之C# / .NET Core 2.0的更多相关文章

  1. Asp.net core 学习笔记 2.2 migration to 3.0

    Ef core 3.0 一些要注意的改变 refer : https://docs.microsoft.com/en-us/ef/core/what-is-new/ef-core-3.0/breaki ...

  2. OpenCV学习笔记(一)——OpenCV3.1.0+VS2015开发环境配置

    摘要: 由于最近AR(增强现实)这个概念非常火爆,各种基于AR的应用及游戏逐渐面向大众,而在AR中最重要的两个技术就是跟踪识别和增强渲染,其中跟踪识别是通过OpenCV这个开源的计算机视觉库来实现的, ...

  3. Docker学习笔记之-部署.Net Core 3.1项目到Docker容器,并使用Nginx反向代理(CentOS7)(一)

    上一节演示如何安装Docker,链接:Docker学习笔记之-在CentOS中安装Docker 本节演示 将.net core 3.1 部署到docker容器当中,并使用 Nginx反向代理,部署平台 ...

  4. (6)学习笔记 ) ASP.NET CORE微服务 Micro-Service ---- AOP框架

    AOP 框架基础 要求懂的知识:AOP.Filter.反射(Attribute). 如果直接使用 Polly,那么就会造成业务代码中混杂大量的业务无关代码.我们使用 AOP (如果不了解 AOP,请自 ...

  5. (2)学习笔记 ) ASP.NET CORE微服务 Micro-Service ---- .NetCore启动配置 和 .NetCoreWebApi

    什么是.Net Core?.Net Core是微软开发的另外一个可以跨Linux.Windows.mac等平台的.Net.Net Core相关知识看文章地步dotnet dllname.dll 运行P ...

  6. (5)学习笔记 ) ASP.NET CORE微服务 Micro-Service ---- 熔断降级(Polly)

    一. 什么是熔断降级 熔断就是“保险丝”.当出现某些状况时,切断服务,从而防止应用程序不断地尝试执行可能会失败的操作给系统造成“雪崩”,或者大量的超时等待导致系统卡死. 降级的目的是当某个服务提供者发 ...

  7. (1)学习笔记 ) ASP.NET CORE微服务 Micro-Service ---- 什么是微服务架构,.netCore微服务选型

    开发工具:VS2017 .Net Core 2.1 什么是微服务?单体结构: 缺点: 1)只能采用同一种技术,很难用不同的语言或者语言不同版本开发不同模块: 2)系统耦合性强,一旦其中一个模块有问题, ...

  8. (11)学习笔记 ) ASP.NET CORE微服务 Micro-Service ---- Thrift高效通讯 (完结)

    一. 什么是 RPC Restful 采用 Http 进行通讯,优点是开放.标准.简单.兼容性升级容易: 缺点是性能略低.在 QPS 高或者对响应时间要求苛刻的服务上,可以用 RPC(Remote P ...

  9. (8)学习笔记 ) ASP.NET CORE微服务 Micro-Service ---- Ocelot网关(Api GateWay)

    说到现在现有微服务的几点不足: 1) 对于在微服务体系中.和 Consul 通讯的微服务来讲,使用服务名即可访问.但是对于手 机.web 端等外部访问者仍然需要和 N 多服务器交互,需要记忆他们的服务 ...

随机推荐

  1. python 安装包查看

    pip freeze可以查看已经安装的python软件包和版本 pip list 也可以

  2. 使用MyEclipse开发Java EE应用:用XDoclet创建EJB 2 Session Bean项目(五)

    MyEclipse限时秒杀!活动火热开启中>> [MyEclipse最新版下载] 六.部署到JBoss服务器 1. 右键单击Servers视图,然后选择New>Server,选择您安 ...

  3. mysql|中主外键关系(转)

    http://my.oschina.net/liting/blog/356150 一.外键: 1.什么是外键 2.外键语法 3.外键的条件 4.添加外键 5.删除外键 1.什么是外键: 主键:是唯一标 ...

  4. 快播CEO王欣:流量跌到零也要转型

    曾因免费与快捷而独霸视频播放器行业的快播科技,或许将迎来壮士断腕的艰难时刻. 4月16日晚,快播于新浪微博上先后发布<公告>和<致快播用户书:我们涅槃在即>,表示快播将启动商业 ...

  5. 《JAVA---day03---运算符》

    /*[位运算符] 运算符: 运算 范例 说明 <<: 左移 3<<2=12--->3*2*2=12 >>: 右移 3>>2=1---->3/ ...

  6. STL标准库-算法-常用算法

    技术在于交流.沟通,本文为博主原创文章转载请注明出处并保持作品的完整性 介绍11种STL标准库的算法,从这11种算法中总结一下算法的基本使用 1.accumulate() 累加 2.for_each( ...

  7. 多种数据库之间的同步工具SymmetricDS

    代码:https://github.com/JumpMind/symmetric-ds 原理: 通过触发器模式同步时,是将数据库的变化记录到某个系统表中,然后在客户端建立缓冲,并定期将变化push到接 ...

  8. Boosting 简单介绍

    前面介绍了Adaboost,知道了Adaboost是损失函数为指数函数的Boosting算法.那么Boosting还包括了以下几个: 损失函数名称 损失函数 算法 平方差(Squared error) ...

  9. ABP .Net Core To Json序列化配置

     一. 前言 我们采用ABP架构用MVC Controller或Web API返回给前端结果ToJson序列化后得到的属性命名都是采用js的驼峰格式,即首字母小写,后面单词首字母大写的格式(如:后台属 ...

  10. Spring JdbcTemplate中的回调

    回调 JdbcTemplate类支持的回调类: 1.预编译语句及存储过程创建回调:用于根据JdbcTemplate提供的连接创建相应的语句: 1.1 PreparedStatementCreator ...