Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/ignatandrei/rscg_iformattable

Roslyn Code Generator for IFormattable
https://github.com/ignatandrei/rscg_iformattable

Last synced: about 2 months ago
JSON representation

Roslyn Code Generator for IFormattable

Awesome Lists containing this project

README

        

# RSCG_IFormattable
Roslyn Code Generator for IFormattable

## Usage
Add to your csproj file:
```xml


```

Add to your source file:
```csharp
[RSCG_IFormattableCommon.AddIFormattable]
internal partial class Person
{
public string? FirstName { get; set; }
public string? LastName { get; set; }
}
```

And then the result is
```csharp
using RSCG_IFormattableConsole;

Person person = new ();
person.FirstName = "Andrei";
person.LastName = "Ignat";

Console.WriteLine(person.ToString("The person name is {FirstName} {LastName}",null));
```