Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ignatandrei/rscg_iformattable
Roslyn Code Generator for IFormattable
https://github.com/ignatandrei/rscg_iformattable
Last synced: 28 days ago
JSON representation
Roslyn Code Generator for IFormattable
- Host: GitHub
- URL: https://github.com/ignatandrei/rscg_iformattable
- Owner: ignatandrei
- License: mit
- Created: 2024-07-11T16:16:02.000Z (6 months ago)
- Default Branch: main
- Last Pushed: 2024-07-13T11:58:34.000Z (6 months ago)
- Last Synced: 2024-12-10T04:32:04.951Z (about 1 month ago)
- Language: C#
- Size: 32.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- RSCG_Examples - https://github.com/ignatandrei/rscg_iformattable/
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));
```