Skip to content

Commit

Permalink
docs: add constants usage sample (#148)
Browse files Browse the repository at this point in the history
Update README.md for constants usage sample
  • Loading branch information
michaeltg17 authored Nov 10, 2024
1 parent dcbf14e commit 169b715
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,4 +40,7 @@ foreach(var kp in MimeMapping.MimeTypes.TypeMap)
{
Console.WriteLine($"File extension: {kp.Key}, mime string: {kp.Value}");
}

//Just use a constant if you already know the file type (performance)
const string mimeType = MimeMapping.KnownMimeTypes.Xlsx
```

0 comments on commit 169b715

Please sign in to comment.