Skip to main content

Difference between Convert.ToString() and .ToString()

Friends

Always remember -> whenever we are using Convert. with anything, it can handle nulls without throwing errors.


Comments

Popular posts from this blog

IEnumerable Vs IEnumerator

Friends This is one of most basic things to understand in .Net Collections (not sure if it is same in Java or other langs). IEnumerable is superclass of all we use Lists, Dictionaries, HashTables and all others.

Regex get string between matching strings

Friends If we want to get exact value between two matching strings. Example :  Statement : Shreeyansh Shlok is a good boy Question : Get value (adjective) between a and boy in above statement a\s(.*)\sboy Output : good Please note, we wanted to catch only the adjective without spaces, so we included \s (regex for matching space) after and before the strings. In case we don't care about space we can use following instead. a(.*)boy Output  : good We can try above or learn more regex here : Regex101 References : Stackoverflow help