DevPinoy.org
A Filipino Developers Community
jokiz » All Tags » .NET » C# (RSS)

>>> First two to make 3 wins! <<<

Browse by Tags

  • C# Trivia Question Series

    Some of you know about the C# trivia series that I started in MSForum's C# section . Good thing some of these posts were revived since they were missing months ago. Here are the links: Trivia #1 - Arraylist's initial size Trivia #2 - String concatenations...
    Published 08-02-2007 11:16 PM by jokiz
    Filed under: , ,
  • Resharper 3.0 Beta is out

    Jetbrains has just released their beta version of Resharper 3.0, download it here . Again, VB.NET guys out there, you should try Resharper since it now supports your language. Resharper 3.0 will now come into three versions (C#, VB and Full edition)....
    Published 05-31-2007 10:24 AM by jokiz
  • Decimal data type for financial applications

    My current project uses a double data type for its values and i have raised a suggestion to convert it to decimal data type instead. I remember that it is recommended to use decimal over double for financial applications because decimal data types have...
    Published 09-07-2006 1:39 PM by jokiz
    Filed under: , , ,
  • Use standard format characters in string formatting

    Whenever you want to format a currency, date, etc. for your application, try to avoid hardcoding your custom format's in your BoundColumn's DataFormatString, ToString format parameter, etc. More often that not, you'd want those formats to be the same...
    Published 09-07-2006 1:36 PM by jokiz
    Filed under: , , ,
  • All about @

    The @ (at) sign in .NET is used for verbatim strings. When you're tired of dealing with escape characters particularly for filenames, you make use of it: [code language="C#"] string filename = @"C:\joeycalisay\projects\" as compared to string filename...
    Published 09-30-2005 11:57 PM by jokiz
    Filed under: , ,
  • Default modifier in .NET

    Obviously you already know that private is the default modifier in .NET. When you declare a field inside a class this way: [code language="C#"] public class Jokiz { int age; } [/code] the age field is private to the Jokiz class by default. Do you know...
    Published 09-30-2005 11:48 PM by jokiz
    Filed under: ,
  • StringBuilder.AppendFormat

    I was refactoring some of our codes yesterday when I bumped into a class used for reporting which is string concat intensive. Obviously, we should use the StringBuilder class due to " strings are immutable " (kind of cliche these days which should be...
    Published 09-13-2005 9:43 AM by jokiz
    Filed under: ,
  • C# Programmer's Cookbook

    Last thursday, I attended Stanley Tan's session at Microsoft. I didn't expect him to repeat his demos and stuff last january techfest @ shangri-la. However, it was worth it because I have won an MSPress book (first time I won in a raffle). C# Programmer...
    Published 09-06-2005 10:26 AM by jokiz
    Filed under: ,
  • IS and AS operator

    Boxing and unboxing in C# has a performance cost and the use of the IS and AS operator in casting objects is trivial for me. I thought before that: [code language="C#"] if (boxed is Person) { Person unboxed = boxed as Person; //do something } [/code]...
    Published 06-11-2005 6:04 PM by jokiz
    Filed under: , ,
  • The (-) operator

    I used to multiply a numeric number to -1 just to get its additive inverse (negative value for positive numbers) and I found out that the (-) operator does it implicitly. int value = 10 int negativeValue = value * -1 int negativeValueAlso = -value
    Published 04-28-2005 6:32 PM by jokiz
    Filed under: , , ,
  • Passing and Returning Reference Types

    I’ve read this excellent article on Arrays of Jeffrey Richter from Wintellect at MSDN here and there are a number of good points in coding, the one I love most is the section on Passing and Returning Arrays . If you always design your methods so that...
    Published 03-18-2005 11:24 AM by jokiz
    Filed under: , ,
  • Efficient For Loop

    [code language="C#"] for (int i = 0; i < collection.Count; i++) { //do something with collection } [/code] I’ve done this before and for me, the efficient way is to store the Count property of the collection rather than access it everytime for the...
    Published 03-17-2005 7:13 PM by jokiz
    Filed under: , , ,
  • Assignment in a WHILE condition

    Before, I used to think that in C, the assignment operator always evaluate to true. It is because of this context: [code language="C#"] while (intLeft == intRight) { //do whatever } [/code] If you mistyped the comparison operator (==) as a single equal...
    Published 01-17-2005 5:34 PM by jokiz
    Filed under: , , ,

Copyright DevPinoy 2005-2008