Skip to content

Duong's Blog

About technology stuff that piqued my interest

  • English
  • Vietnamese
  • About me

Category: C#

  • Home
  • C#

Nhược điểm của Ignored trong FakeItEasy

August 8, 2022August 8, 2022 duongnt.bk1 Comment on Nhược điểm của Ignored trong FakeItEasy

FakeItEasy là thư viện tôi hay dùng để tạo mock object. Nhưng property Ignored của nó có thể gây hại nếu ta không cẩn thận.

C#, Vietnamese bug, fakeiteasy, testing

FakeItEasy Ignored might be harmful

August 8, 2022August 8, 2022 duongnt.bkLeave a Comment on FakeItEasy Ignored might be harmful

FakeItEasy is my favorite library to create mock objects for unit tests in C#. One of its features, the `Ignored` property, can be harmful if used improperly.

C#, English bug, fakeiteasy, testing

Tên trường của ValueTuple trong C#

July 11, 2022July 11, 2022 duongnt.bkLeave a Comment on Tên trường của ValueTuple trong C#

Đặt tên cho trường trong ValueTuple không phải là một tính năng đột phá của C#. Nhưng các bạn đã bao giờ tự hỏi chức năng đó hoặt động như thế nào?

C#, Vietnamese C#, ValueTuple

All about ValueTuple field names in C#

July 11, 2022July 11, 2022 duongnt.bk1 Comment on All about ValueTuple field names in C#

Naming fields in ValueTuple is not a ground-breaking feature. After all, it is just syntactic sugar. But have you ever wondered how that feature is implemented?

C#, English C#, ValueTuple

Expression Tree for IQueryable in LINQ

June 29, 2022June 29, 2022 duongnt.bkLeave a Comment on Expression Tree for IQueryable in LINQ

To avoid hard-coding attribute names in LINQ code of the IQueryable type, we can manually create Expression Tree. This helps eliminate duplicated code.

C#, English C#, expression-tree, linq

Expression Tree cho IQueryable trong LINQ

June 29, 2022June 29, 2022 duongnt.bk1 Comment on Expression Tree cho IQueryable trong LINQ

Ta có thể tự tạo Expression Tree để tránh hard-code tên attribute trong code LINQ của IQueryable. Điều này giúp hạn chế trùng lặp code.

C#, Vietnamese C#, expression-tree, linq

Task.Yield – a rarely used method in C#

June 13, 2022June 13, 2022 duongnt.bk1 Comment on Task.Yield – a rarely used method in C#

The Task.Yield method can “creates an awaitable task that asynchronously yields back to the current context when awaited”. Let’s find out what that means today.

C#, English C#, concurrency, Task.Yield

Task.Yield – một hàm ít dùng trong C#

June 13, 2022June 13, 2022 duongnt.bkLeave a Comment on Task.Yield – một hàm ít dùng trong C#

Hàm Task.Yield sẽ trả lại quyền điều khiển cho context hiện tại ngay khi được await. Điều đó có nghĩa là gì? Hãy cùng tìm hiểu trong bài hôm nay.

C#, Vietnamese C#, concurrency, Task.Yield

Tag Helpers và custom tag trong ASP.NET Core

May 25, 2022May 26, 2022 duongnt.bkLeave a Comment on Tag Helpers và custom tag trong ASP.NET Core

Tính năng Tag Helpers trong ASP.NET Core được dùng để tạo custom tag hoặc custom attribute cho HTML tag sẵn có. Hãy cùng tìm hiểu trong bài hôm nay.

C#, Vietnamese ASP.NET Core, C#, Tag Helpers

Tag Helpers and custom tags in ASP.NET Core

May 25, 2022May 26, 2022 duongnt.bk1 Comment on Tag Helpers and custom tags in ASP.NET Core

In ASP.NET Core, Tag Helpers can be used to create custom HTML tags, or to create custom attributes for other tags. Let’s find out how to do that.

C#, English ASP.NET Core, C#, Tag Helpers

Posts navigation

Older posts
Newer posts
Copyright © 2025 Duong's Blog All rights reserved. Theme: Flash by ThemeGrill. Powered by WordPress