Submit
Home of
791
C#
,
Visual Basic
,
F#
,
Swift
,
Kotlin
and
javascript
extension methods
joseph-k submitted these extension methods
NullStringToEmptyString
If input is null, returns empty string. Otherwise returns original input. After using this method, you can use all string methods without the danger of null exception.
C#
string
Joseph K
TimeSpan Sum
C# LINQ has no Sum method for TimeSpan. Here it is1
C#
TimeSpan
Joseph K
TimeSpan Average
C# LINQ has no Average method for TimeSpan. Here it is!
C#
TimeSpan
Joseph K
;