.NET

.NET Blog

Application Models

  • Web
  • Mobile
  • Desktop
  • Microservices
  • Gaming
  • Machine Learning
  • Cloud
  • Internet of Things
Language Version
C#
Visual Basic
F# 4.7
Platform Version Feature
.NET Core 3.0 (runs anywhere!) Windows, Linux, and macOS
.NET Framework 4.8 websites, services, and apps on Windows
Xamarin/Mono a .NET for mobile
.NET Standard The one platform, the shared set of libraries for the above

Library

  • Nuget

Tools

  • Visual Studio Marketplace

Learn More

Training Progress
.NET Core 101 (Youtube) 3/8

Resources



.NET - 3rd Party Resources

.NET Unit Testing Frameworks

  • MsTest
  • xUnit
  • NUnit

MsTest, NUnit, xUnit are test framework, MsTest is what we using right now, but seems xUnit is more clear and lean.

.NET Mock/Fake Frameworks

Code Refactoring

Source Making

  • Design patterns

    • Creational patterns
    • Structural patterns
    • Behavioral patterns
  • AntiPatterns
    • Software Development AntiPatterns
    • Software Architecture AntiPatterns
    • Project Management AntiPatterns
  • Refactoring
    • Code Smells
    • Refactoring techniques
  • UML
    • Introduction
    • Introduction to the Case Study
    • Modeling Business Systems
    • Modeling IT Systems
    • Modeling for System Integration

Refactoring.Guru

  • Refactoring
  • Design Patterns

What's .NET Framework

.NET Framework = Java Runtime (Execution Runtime))

C# = Java (Programming Language)

Check Project Source Codes

  1. Get/download source codes from code repository (from VSTS)
  2. Restore Nuget Packages
    1. Right-click solution name
    2. Click 'Restore Nuget Packages'
  3. Rebuild
    1. Right-click solution name
    2. Click 'Clean Solution'
    3. Right-click solution name
    4. Click 'Rebuild Solution'

.NET Framework Versioning

How to: Determine which .NET Framework version project developed on

  1. Right-click project name
  2. Click 'Properties' (or Press Alt+Enter)

How to: Determine which .NET Framework versions are installed on the Machine

C# Versions

C# Version History

  • C# 6.0 - .NET 4.6, VS 2015
  • C# 7.0 - .NET 4.7, VS 2017
  • C# 8.0 - in preview

Application Types

  • Library

    • Class Library
  • Console
    • Console App
  • Desktop
    • Windows Forms App
    • WPF App (Windows Presentation Foundation) - XAML
  • Web
    • ASP.NET Web Site - Script block in web page source
    • ASP.NET Web Forms - .aspx + .cs
    • ASP.NET Web App - .cshtml (Razor) + .cs
      • ASP.NET MVC - for dynamic web pages
      • ASP.NET Web API - for REST API

Console App

Set Console App Project as StartUp Project

  1. Right-click project name
  2. Click 'Set as StartUp Project'
Program Entry
  • File: Program.cs
  • Method:
static void Main(string[] args)
* args: Console command parameters, e.g. myApp param1, param2, ..., paramN
Exception Handling
try{
// logic
}
catch(Exception ex){
// execute when specific exception/error happends
}
Conditional Statements
Log Level
  • Debug
  • Info
  • Warn
  • Error
  • Fatal

API Error Handling

  • HTTP 200 + Succeed Flag = Logical Correct
  • HTTP 200 + Failed Flag = Logical Incorrect
  • HTTP 404/500 (Web Server/Software Error, Authentication Error) = Application Error
  • HTTP 505 (Network Not Found) = Network Error

HTTP Method

  • HTTP GET (URL only)
  • POST (with HTTP body)
  • HEAD
  • OPTION (query description doc)
  • PUT
  • DELETE

HTTP Request/Response Model

  • Request

    • HTTP URL
    • HTTP Headers (including cookies)
    • HTTP Body
  • Response
    • HTTP Headers (including return code)
    • HTTP Body
JSON (JavaScript Object Notation)
  • Serialize: Object(s) -> JSON text/string
  • Deserialize: JSON text/string -> Object(s)
Generic Type
public static FunctionName<T>
Variable Types
  • Reference Type (Class, ref)

    • Pass itself into function, and will be returned back with value changes in function
  • Value Type (Structure, basic types e.g. numbers)
    • Pass its shadow copy and original variable will not be impact
C# Lambda Expressions

C# Lambda Expressions

Enumerable.Aggregate Method

.NET Core Ecosystem的更多相关文章

  1. [翻译]为你的服务器选择正确的.NET

    英文原文 By Daniel Roth ASP.NET 5 is based on the .NET Execution Environment (DNX), which supports runni ...

  2. 魅力 .NET:从 Mono、.NET Core 说起

    前段时间,被问了这样一个问题:.NET 应用程序是怎么运行的? 当时大概愣了好久,好像也没说出个所以然,得到的回复是:这是 .NET 程序员最基本的...呵呵! 微软开源,其实不只是对 .NET 本身 ...

  3. [转]Writing Custom Middleware in ASP.NET Core 1.0

    本文转自:https://www.exceptionnotfound.net/writing-custom-middleware-in-asp-net-core-1-0/ One of the new ...

  4. .NET:从 Mono、.NET Core 说起

    魅力 .NET:从 Mono..NET Core 说起 前段时间,被问了这样一个问题:.NET 应用程序是怎么运行的? 当时大概愣了好久,好像也没说出个所以然,得到的回复是:这是 .NET 程序员最基 ...

  5. NoSQL生态系统(nosql ecosystem)

    Unlike most of the other projects in this book, NoSQL is not a tool, but an ecosystem composed of se ...

  6. Introducing .NET Core

    At connect(), we announced that .NET Core will be entirely released as open source software. I also ...

  7. Spring Framework Ecosystem – Introduction to Spring Projects

    来自于:http://springtutorials.com/spring-ecosystem/ Hello and Welcome to Spring Tutorials Blog! Is it f ...

  8. 一篇很好的解释了.Net Core, .Net Framework, .Net standard library, Xamarin 之间关系的文章 (转载)

    Introducing .NET Standard In my last post, I talked about how we want to make porting to .NET Core e ...

  9. 魅力 .NET:从 Mono、.NET Core[转]

    前段时间,被问了这样一个问题:.NET 应用程序是怎么运行的? 当时大概愣了好久,好像也没说出个所以然,得到的回复是:这是 .NET 程序员最基本的...呵呵! 微软开源,其实不只是对 .NET 本身 ...

随机推荐

  1. CAS单点登录(一)——初识SSO

    转载:https://blog.csdn.net/Anumbrella/article/details/80821486 一.初识CAS 首先我们来说一下CAS,CAS全称为Central Authe ...

  2. 关于Xgboost的笔记

  3. LeetCode-093-复原 IP 地址

    复原 IP 地址 题目描述:给定一个只包含数字的字符串,用以表示一个 IP 地址,返回所有可能从 s 获得的 有效 IP 地址 .你可以按任何顺序返回答案. 有效 IP 地址 正好由四个整数(每个整数 ...

  4. LeetCode-015-三数之和

    三数之和 题目描述:给你一个包含 n 个整数的数组 nums,判断 nums 中是否存在三个元素 a,b,c ,使得 a + b + c = 0 ?请你找出所有和为 0 且不重复的三元组. 注意:答案 ...

  5. JS 实现排序算法

    冒泡排序 比较相邻的元素.如果第一个比第二个大,就交换他们两个. 对每一对相邻元素做同样的工作,从开始第一对到结尾的最后一对.在这一点,最后的元素应该会是最大的数. 针对所有的元素重复以上的步骤,除了 ...

  6. 无法加载文件 **.ps1,系统中禁止执行脚本

    控制台执行命令后出现 无法加载文件 ******.ps1,因为在此系统中禁止执行脚本.有关详细信息,请参阅 "get-help about_signing" 在控制台执行命令: s ...

  7. mysql更改my.ini配置文件以后mysql服务无法启动

    最近在调试mysql时,更改了mysql的端口以后发现,mysql怎么改都启动不了,从其它机器重新复制一个my.ini文件就可以启动,这是由于一般用记事本打开配置文件同时更改的ini的格式,我们需要重 ...

  8. Netty学习(四)FastThreadLocal

    FastThreadLocal 前面介绍过 JDK 的 ThreadLocal , 使用不当的话容易造成内存泄漏最终导致OOM, 并且也有一些地方设计的不够好(相对于接下来要介绍的 FastThrea ...

  9. 今天我自己第一次写了一个Windows批处理bat脚本,一起学习一下吧。

    今天我自己第一次写了一个Windows批处理bat脚本,备注一下 事情原由:自己使用Java开发了一个加解密的工具.但是当把工具给别人使用的时候,别人还需要把代码编译打包, 然后还需要看一下代码里面的 ...

  10. 嵌入式linux驱动开发 笔记

    @ 目录 首个驱动hellodrv 1.编写源码 2.编译模块 3.加载驱动 首个驱动hellodrv 3.如果下载不到,就自己编写,并编译驱动. 1.编写源码 2.编译模块 1.先写makefile ...