GetType() vs typeof() in C#

question-type-one-correct-icon‘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()
Read More

Difference between ‘string’ and ‘System.String’ in C#

Programming-icon‘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:

1 using string = System.String;
2 using char = System.Char;
3 using int = System.Int32;
4 using double = System.Double;
Read More

Why I keep getting the wrong floating point result in C#

Something that took me while to figure out.

1 double result = 1 / 3; //will return 0.
2 double resutt = 1 / 3.0; // will return 0.33333
3

source-cs-iconEver 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 to be done in floating point).

Read More

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-entrepreneurs/
Read More

Fourth Business Venture–Blogmakeover.net

I_Heart_Blogmakeover_BadgeBlogmakeover.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. Leveraging on the blog editor tools, business owner (without programming knowledge) can share their products or services online. With a click of a button, the contents are published online and with the built-in social media buttons, it can be shared to the world via Facebook, Twitter, Google Plus and etc.

The whole idea of using Blogger as a business website came up when a cousin of mine (Jenny, which happen to be our first client) came to me for a web design job for her home bakery business. She showed me how she is using Blogger back then to take orders and upload photos of her handmade cakes. Then, the “light-bulb” moment struck me when she asked if she could use Blogger as her business website since she is familiar with it and it’s free to use. Without giving her any specific answer, I brought the idea home and dive into research immediately. It didn’t take me too long to find out that blogger template are editable but not many knows how to do it as there is no documentation provided by Blogger. Most of the information available online are compiled by enthusiasts who have putted in hours of trial and errors.

It took us one month to learn the basics of blogger template programming code (and yes, we are still learning it today) and another one month to design and code Jenny’s website (www.intoxicaketed.com). We have came a long way and are now able to complete a job on average within 7 working days. Have completed 12 templates up to date and hopefully we can grow the list in the future. We love to demonstrate how Blogger can be simple, cost-effective and FUN to use as business website. Winking smile

You can our latest portfolio in the link below:

http://www.blogmakeover.net/search/label/blogmakeover

Read More

My new blog–Connecting the dots…

JasonHave decided to buy myself a domain for a long time. Finally, i made it. Winking smile  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 and circuits that i built at spare time.
  • Downloads: i do write small apps and made it available for downloads.
  • Ramblings: notes that are important to me but not others.

Well, that’s all for my first post – connecting the dots and setting up a new path ahead.

Read More