Legal Notice
The opinions expressed herein are my own personal opinions and do not represent my employer’s view in anyway.Top Posts
- C# DateTime to UNIX timestamps
- .NET 6.0 and Simple (minimal) Api's: Create an Api without controllers
- C# Convert array of objects into a DataTable
- C# get results from Task.WhenAll
- C# Get expiry timestamp from JWT token
- C# JWT Token Get Expiry Timestamp
- C# HttpClient POST or PUT Json with content type application/json
Archive
Meta
Tag Archives: Extension Methods
C# String Token Replacer
Imagine this classic text where you need to replace tokens with some values: Welcome {{user}}. Click on this link to confirm your subscription: {{url}}. Tokens encapsulated in double brackets {{token}} are commonly used to mark tokens to be replaced with … Continue reading
Posted in .net, c#, General .NET
Tagged Email, Extension Methods, SparkPost, String, Token
Leave a comment
XElement get default values using extension methods
I often work with dynamic XML documents which might or might not contain the element, field or attribute that I am looking for. The Standard .NET XElement class is pretty strict (as it should be) and returns a null reference … Continue reading
Posted in .net, c#, General .NET
Tagged Default values, Extension Methods, XElement, XML, XmlElement
1 Comment
Simple string keyword search using ExtensionMethods and LINQ
This is a case I ran into recently. I need to create a multiple OR condition with LINQ. I have a list of user names and I wish to create a simple search where I can match any first name/middle … Continue reading