پیشنهاد اضافه شدن type به JavaScript
Today we’re excited to announce our support and collaboration on a new Stage 0 proposal to bring optional and erasable type syntax to JavaScript. Because this new syntax wouldn’t change how surrounding code runs, it would effectively act as comments. We think this has the potential to make TypeScript easier and faster to use for development at every scale. We’d like to talk about why we’re pursuing this, and how this proposal works at a high level.
31 نکته برای کدنویسی بهتر در سی شارپ
We developers spend lot of our time reading code. We read code so that we know how to change it to implement a new feature, fix a bug, etc. It is much better to work in a code base where code is easy to read and understand.
One thing that can make code readable is good naming. Giving variables, classes, and methods good names makes code easier to read.
دریافت C# 9 Cheat Sheet
C# 9 Cheat Sheet with code example and pros and cons.
- Records
- Init only setters
- Top-level statements
- Pattern matching enhancements
- Native sized integers
- Function pointers
- Suppress emitting localsinit flag
- Target-typed new expressions
- static anonymous functions
- Target-typed conditional expressions
- Covariant return types
- Extension GetEnumerator support for foreach loops
- Lambda discard parameters
- Attributes on local functions
- Module initializers
- New features for partial methods
امکانات جدید سی شارپ 9
سی شارپ 9 امکانات و بهبودهای جدید را اضافه خواهد کرد :
- Records
- Init only setters
- Top-level statements
- Pattern matching enhancements
- Native sized integers
- Function pointers
- Suppress emitting localsinit flag
- Target-typed new expressions
- static anonymous functions
- Target-typed conditional expressions
- Covariant return types
- Extension
GetEnumerator
support forforeach
loops - Lambda discard parameters
- Attributes on local functions
- Module initializers
- New features for partial methods
این نسخه بر روی دات نت 5 پشتیبانی خواهد شد برای اطلاعات بیشتر ^
دریافت Swagger از نوگت
pm> Install-Package Swashbuckle.AspNetCore
پیکربندی برنامه
using Microsoft.AspNetCore.Mvc; using Swashbuckle.AspNetCore.Swagger; namespace MyProject.Web.Api { public class Startup { public IServiceProvider ConfigureServices(IServiceCollection services) { // Register the Swagger generator, defining one or more Swagger documents services.AddSwaggerGen(c => { c.SwaggerDoc("v1", new Info { Title = "MyProject API Documentation", Version = "v1" }); }); } public void Configure(IApplicationBuilder app, IHostingEnvironment env, IServiceScopeFactory serviceScopeFactory) { // Enable middleware to serve generated Swagger as a JSON endpoint. app.UseSwagger(); // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.), specifying the Swagger JSON endpoint. app.UseSwaggerUI(c => { c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1"); }); } } }
مشاهده خروجی مستند سازی API ها
http://localhost:port/swagger
NuGet 2.0 منتشر شد
Attempting to install or uninstall results in the error "Cannot create a file when that file already exists.” For some reason, Visual Studio extensions can get in a weird state where you've uninstalled the VSIX extension, but some files were left behind. To work around this issue: 1. Exit Visual Studio 2. Open the following folder (it might be on a different drive on your machine) C:\Program Files (x86)\Microsoft Visual Studio 10.0\Common7\IDE\Extensions\Microsoft Corporation\NuGet Package Manager\<version>\ 3. Delete all the files with the .deleteme extensions. 4. Re-open Visual Studio After following these steps, you should be able to continue.