-
-
Save profesor79/dd69d0f3a10cfcba575d05055efcbe97 to your computer and use it in GitHub Desktop.
format and reduce interpolation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void EffectiveCode(string testString) | |
{ | |
var dt = DateTime.UtcNow; | |
var period = string.IsNullOrWhiteSpace(testString) | |
? $"{dt:MMM-yy}" | |
: $"{dt:MMM-yy} {testString}"; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment