linq - SingleOrDefault: How to change the default values? -


Single default default returns are empty, but what if I want to assign a value to represent that object which is not met?

You can do something like

  myStrings.DefaultIfEmpty (" MyDefaultString "). Single ()  

Check Out


Comments

Popular posts from this blog

python - Overriding the save method in Django ModelForm -

html - CSS autoheight, but fit content to height of div -

qt - How to prevent QAudioInput from automatically boosting the master volume to 100%? -