https://github.com/nsnail/nsext
The NSExt is a .NET extension function library
https://github.com/nsnail/nsext
extention-methods utils-library
Last synced: 4 months ago
JSON representation
The NSExt is a .NET extension function library
- Host: GitHub
- URL: https://github.com/nsnail/nsext
- Owner: nsnail
- License: mit
- Created: 2022-07-15T08:39:56.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2025-11-24T06:07:23.000Z (7 months ago)
- Last Synced: 2026-02-15T12:53:58.902Z (4 months ago)
- Topics: extention-methods, utils-library
- Language: C#
- Homepage: https://www.nuget.org/packages/NSExt
- Size: 200 KB
- Stars: 9
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Contributing: docs/CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# ns-ext
[中](README.zh-CN.md) | **En**
The **ns-ext** is a .NET extension function library, containing the following types of extension modules:
| Features | File name |
|------------------------------------------|------------------------------------|
| Byte type extension | ByteExtensions.cs |
| Character Type Extensions | CharExtensions.cs |
| Date Type Extensions | DateTimeExtensions.cs |
| Database command type extension | DbCommandExtensions.cs |
| Decimal Number Type extension | DecimalExtensions.cs |
| Enumable type extension | EnumerableExtensions.cs |
| Enumeration type extension | EnumExtensions.cs |
| General type extension | GenericExtensions.cs |
| Integer type extension | IntExtensions.cs |
| Json Serialization option type extension | JsonSerializerOptionsExtensions.cs |
| Log type extension | LoggerExtensions.cs |
| Long integer extension | LongExtensions.cs |
| Object type extension | ObjectExtensions.cs |
| Stream type extension | StreamExtensions.cs |
| String type extension | StringExtensions.cs |
| Prototype type extension | TypeExtensions.cs |
| Resource locator type extension | UriExtensions.cs |
## Quick start
### Install
```shell
dotnet add package NSExt --prerelease
```
### Example
```c#
using NSExt.Extensions;
internal static class Program
{
private class Person
{
public string Name { get; set; }
public int Age { get; set; }
}
public static void Main(string[] args)
{
var person =
"""
{
"Name": "Jason",
"Age": "30"
}
""".Object();
Console.WriteLine(person.Json());
}
}
```
### Output
```json
{"name":"Jason","age":30}
```