Tuesday, November 28, 2017

One more recursive function

Nov. 28, 2017

Introduction


It is the fifth time I write the recursive function related to C# GetType() in mock interview. I wrote a blog about past practice. One of blogs is here.

This time I came cross two issues in mock interview on Nov. 28, 2017, one is to write String.IsEmptyOrNull, I did not know that the API is static function of String class. In other words, String.IsEmptyOrNull(string s) is the prototype of API.

The second one is to write value.GetType() == Dictionary, which should be value.GetType() == Dictionary<string, object>. It is time to learn more about C# strong typing.

Here is C# code.

Actionable Items


Plan to read C# source code of string class, and then write down study notes.
Look into C# strong typing related topic as well.



No comments:

Post a Comment