‘typeof()’ is actually an operator for ‘GetType()’, so both function are same. Both returns an object ‘Type’ which can be used to find out further information like properties, methods and etc. 1: Type typeObj = obj.GetType(); // Return the same result like typeof() 2: Type typeObk = typeof(obj); // Return the same result like .GetType()...
Difference between ‘string’ and ‘System.String’ in C#
‘string’ is an alias (or shorthand) of System.String. That means, by typing ‘string’ we meant System.String. As pointed out by Jeffrey Richter (in his book CLR via C#, page 119), it’s as if every C# program (in Visual Studio) contained ‘using’ directives like the following: !--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1 using string = System.String;2 using char = System.Char;3 using int = System.Int32;4 using double = System.Double;...
Labels:
Codes
Why I keep getting the wrong floating point result in C#
Something that took me while to figure out. !--Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->1 double result = 1 / 3; //will return 0.2 double resutt = 1 / 3.0; // will return 0.333333 Ever wonder why I'm getting 0 (in Line 1) while i have already assign it to double type? Here’s the explanation: Line 1 return 0 as a result because C# interprets numeric value as integer, and integer division is performed with truncation; hence, 0. Line 2 is interpreted as floating point calculation because of 3.0 (putting a decimal point for the calculation...
Labels:
Codes
Some stuff for myself when i feel less motivated in life
These are some of the stuff I should spend time going through when i feel less motivated in life.
If ever, i feel like giving up on entrepreneurship; take a look at this and learn what mistake I made.
http://www.forbes.com/sites/brianclark/2012/06/06/characteristics-entrepreneur...
Labels:
Ramblings
Fourth Business Venture–Blogmakeover.net
Blogmakeover.net is my fourth business venture. It also marks my second business partnership with Chris. What Blogmakeover.net provides is basically service to design and to convert a blogger into a business website with customize themes, widgets and features. Not many realize the power of Blogger as a platform to build your online business website. Blogger is a blogging platform (owned by Google) and used by more than 1 millions users all over the world. With minor tweaks here and there, some design works plus some plugins (from us), Blogger can be a great platform for small business owner....
Labels:
Venture
My new blog–Connecting the dots…
Have decided to buy myself a domain for a long time. Finally, i made it. You can find my previous blog here – jeeshenlee.wordpress.com (yes, i will not longer post there but i do drop by occasionally to answer comments). So, this is my new personal blog where i share stories about my entrepreneurship journey, codes that i wrote at work and circuits that i build at spare time. I will try to keep it simple and manageable by posting with different tags: Venture: about my entrepreneurship journey. Codes: obviously, about programming codes. I’m a .NET developer. Circuits: about electronics...
Subscribe to:
Posts (Atom)