你的位置: 首页 / 资讯列表 / 分类资讯

最新.NET/.NET Core/Web开发资讯源


7 热度

Running .NET Core Applications as a Windows Service

In this article, we are going to learn how to create a .NET Core Worker Service and run it as a Windows Service.

收录时间: 2022-07-01
分类: .NET Core
贡献者: Rector
21 热度

Using Refit to Consume APIs in C#

Consuming APIs over HTTP is a very common scenario when building applications. In this article, we are going to explore Refit to consume APIs in C#.

收录时间: 2022-06-29
分类: C#
贡献者: Rector
23 热度

How to Use Span in C# to Improve Application Performance

Performance is always an important factor in software development. It is not something only the developers of a framework must consider. When the .NET team released the Span<> class they empowered developers to improve application performance, if used correctly. In this article, we will learn about Span in C#, how it is implemented, and how we can use it to increase performance.

收录时间: 2022-06-28
分类: C#
贡献者: Rector
35 热度

C# Winform 相册功能,图片缩放,拖拽,预览图分页

在很多项目中也需要用到预览图片的功能,至于为什么加一个添加图片的功能,是因为有些项目,比如视觉相关的工作,会需要摄像机采集图片,然后显示在界面上,所以,图片也是一张一张的添加的,另外,就是分页功能,当预览图位置不够用时就会用到,所以我也加了进来。

收录时间: 2022-06-27
分类: C#
贡献者: Rector
32 热度

C# Winform 自定义进度条ProgressBar

Winfrom各种老毛病真的不适合做大型项目,甚至中型项目都不适合,一些小功能都能把你折腾半死,比如,我想在界面上显示一个进度条,用来显示现在硬盘和内存已经使用了多少,使用了 ProgressBar 控件你看看效果:进度条中间一直有个白色光影在晃来晃去的,是不是想让别人感慨:“哇!好强的光芒,我的眼睛快睁不开了...”。而且背景颜色无法改变,这个动画也无法关掉,为了解决这两个问题,我找了很久,终于找到了下面的解决方法。二、自定义进度条于是我在网上找了一些资料,有到效果有,但不是特别漂亮,比如下面这个C# WinForm 自定义进度条控件_科技_品阅网另外,我参考了下面到帖子Win...

收录时间: 2022-06-27
分类: C#
贡献者: Rector
31 热度

Async Enumerable in C# (Part 2)

In this second part of my series on IAsyncEnumerable (part 1 is here), I want to consider what happens when we want to make asynchronous calls within a LINQ pipeline. This is actually something that's very difficult to achieve with an IEnumerable but much more straightforward with IAsyncEnumerable.

收录时间: 2022-06-27
分类: C#
贡献者: Rector
AD 友情赞助
30 热度

Remove Duplicates From a List in C#

In this article, we will learn the different methods to remove duplicates from a list in C#. List is a collection having elements of the same type which can contain multiple occurrences of the same item. Sometimes, we want that every element is unique, and here we will check various ways to achieve this goal, comparing their performance.

收录时间: 2022-06-27
分类: C#
贡献者: Rector
25 热度

ApiController Attribute in ASP.NET Core Web API

In this article, we will learn about the ApiController attribute and the features it brings to our Web API controllers.

收录时间: 2022-06-27
分类: ASP.NET Core
贡献者: Rector
29 热度

Incremental ASP.NET Migration Tooling Preview 2

Last month, we introduced preview tooling to incrementally migrate ASP.NET apps to ASP.NET Core. The tooling comprised two components – a Visual Studio extension that created a new ASP.NET Core app alongside an existing ASP.NET app such that endpoints could be gradually moved from one app to the other, and a library of System.Web adapter APIs allowing code to reference common System.Web APIs while targeting .NET Standard 2.0 and being usable in both ASP.NET and ASP.NET Core contexts.

收录时间: 2022-06-27
分类: ASP.NET
贡献者: Rector
53 热度

The Future of Multi-Platform .NET Application Development with WinUI, Net6 and the Uno Platform

In this post, we’re actually going to use an additional template that’s available via the Uno.Extensions.Templates package. Let’s create our application and then we’ll walk through what’s created by the template and how you can use it to jump start your next Uno Platform application.

收录时间: 2022-06-21
分类: .NET 6
贡献者: Rector
50 热度

How to Call Generic Method Using Reflection in C#

In this article, we are going to learn how to call a generic method in C# using reflection. Generic methods are an all-time favorite of library developers for their inherent reusability and type inference benefits. But because of the need for explicit type arguments in most cases (except when type inference occurs implicitly), we can’t always make the best use of them in compile time. This is where reflection comes into play.

收录时间: 2022-06-21
分类: C#
贡献者: Rector
39 热度

Should I avoid LINQ for performance reasons?

When I created my More Effective LINQ Pluralsight course (hopefully to be updated in the not too distant future!), I wanted to include a section that discussed the question of the performance implications of using LINQ. Sometimes developers hear that "LINQ is slower than using a for loop" and wonder whether that means they should avoid using LINQ for performance reasons.

收录时间: 2022-06-21
分类: .NET
贡献者: Rector
87 热度

Performance Best Practices for Using gRPC on .NET

Since gRPC is often used for processing large volumes of data inside a distributed application, this communication mechanism must be optimized for the best performance. In this chapter, we will cover some best practices when it comes to using gRPC on ASP.NET Core to optimize its performance as much as possible.

收录时间: 2022-06-07
分类: .NET
贡献者: Rector
73 热度

EF Core - Configurations That Apply to All Tables

In our previous post, we split all of the entity configurations by table into their own configuration mapping file. The next step is to create a base class that all of the configuration mappings inherit from where we can put configurations that all entities should get.

收录时间: 2022-06-07
贡献者: Rector
73 热度

Runtime C# Code Compilation Revisited for Roslyn

In this post I'll talk about the process of using the Roslyn C# Code compilation APIS and the why's and how's of creating a WestWind.Scripting wrapper and more importantly how I actually use it in one of my popular applications.

收录时间: 2022-06-07
分类: C#
贡献者: Rector
AD 友情赞助
62 热度

C# Unit Testing

Check that your code is working as expected by creating and running unit tests. It's called unit testing because you break down the functionality of your program into discrete testable behaviors that you can test as individual units. Unit Testing is a software testing approach which is performed at development time to test the smallest component of any software. Unit test cases help us to test and figure out whether the individual unit is performing the task in a good manner or not.

收录时间: 2022-06-07
分类: C#
贡献者: Rector
65 热度

Clean way to add Startup class in ASP.NET Core 6

If you are following ASP.NET Core 6, then probably you are aware that with ASP.NET Core 6.0 projects, there is no Startup.cs file. It is now combined with Program.cs file to bring unified experience. I posted about How to Add Startup.cs in ASP.NET Core 6 Project and this approach brings Startup.cs class in the project in a traditional way that we have today with ASP.NET Core 5 and it’s prior version. But what if we can improve things and make it better. Well, in this post, let’s take a look at a clean way to add Startup class in ASP.NET Core 6 projects.

收录时间: 2022-06-07
分类: ASP.NET Core
贡献者: Rector
60 热度

Global Using Directives in C#

In this article, we are going to learn about Global Using Directives in C#. When we create a console application using .NET 6, the Program.cs class contains a single line of code...

收录时间: 2022-06-07
分类: C#
贡献者: Rector
66 热度

Reflection in C#

In this article, we are going to talk about Reflection in C#. Let’s start. What is Reflection in C#? In the OOP world, we define the characteristics and behaviors of objects using models i.e. class, struct, etc. The data that can describe these models, definitions, and similar application components are commonly known as metadata. In C#, we can deal with such metadata at runtime through a powerful built-in mechanism called Reflection.

收录时间: 2022-06-07
分类: C#
贡献者: Rector
76 热度

How to add Swagger to ASP.NET Core 6 Application

Swagger is very popular and doesn’t need an introduction. It helps you to test your API. Earlier, I posted about how to add Swagger to ASP.NET Core 2.0 web API and those steps still works for ASP.NET Core 5 based applications where you bring Swashbuckle nuget packages and then add code to Startup.cs file to enable Swagger. But with ASP.NET Core 6, things have become a little easy and time saving. Now you can easily add swagger to ASP.NET Core 6 application with a mouse click.

收录时间: 2022-06-01
分类: ASP.NET Core
贡献者: Rector
AD 友情赞助