DevPinoy.org
A Filipino Developers Community
Sign in
|
Join
|
Help
Home
Blogs
Media
Forums
Groups
DevCast
jokiz
»
All Tags
»
C#
(
RSS
)
Browse by Tags
jokiz
Home
Contact
Syndication
RSS for Posts
Atom
RSS for Comments
Email Notifications
Go
Recent Posts
C# Trivia #6
C# Trivia Question Series
Resharper 3.0 Beta is out
Decimal data type for financial applications
Use standard format characters in string formatting
Tags
.NET
agile
ASP.NET
blogging
bug
C#
continuous integration
controls
design guidelines
designer
keyboard shortcuts
lokal
mobile
ms word
NHibernate
rants
resharper
SQL
subversion
tdd
techie
tips
version control
visual studio
windows forms
View more
News
Subscribe to jokiz by Email
Archives
December 2007 (3)
October 2007 (3)
September 2007 (2)
August 2007 (4)
July 2007 (9)
June 2007 (5)
May 2007 (12)
April 2007 (7)
March 2007 (8)
February 2007 (11)
January 2007 (15)
December 2006 (10)
November 2006 (8)
October 2006 (9)
September 2006 (20)
August 2006 (23)
July 2006 (17)
June 2006 (30)
May 2006 (27)
April 2006 (21)
March 2006 (24)
February 2006 (14)
January 2006 (5)
December 2005 (4)
November 2005 (7)
October 2005 (2)
September 2005 (7)
August 2005 (5)
July 2005 (6)
June 2005 (14)
May 2005 (4)
April 2005 (18)
March 2005 (17)
February 2005 (14)
January 2005 (8)
.NET
C
java
localization
performance
resharper
techie
tips
tools
visual studio
C# Trivia #6
As I've mention in this post, I'll be continuing the trivia series here in my blog. I've encountered a good one from internal chat yesterday, here it is: will this compile? [ Test ] public void IntTests () { int i = 1; if ( i != null ) { Debug...
Published
Thu, Dec 12 2007 1:43 PM
by
jokiz
Filed under:
trivia
,
C#
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
Thu, Aug 08 2007 11:16 PM
by
jokiz
Filed under:
.NET
,
trivia
,
C#
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
Thu, May 05 2007 10:24 AM
by
jokiz
Filed under:
.NET
,
visual studio
,
C#
,
resharper
,
tools
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
Thu, Sep 09 2006 1:39 PM
by
jokiz
Filed under:
.NET
,
techie
,
tips
,
C#
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
Thu, Sep 09 2006 1:36 PM
by
jokiz
Filed under:
.NET
,
techie
,
C#
,
localization
java's protected == .NET's protected internal
i was teaching the basics of inheritance in java to one of my math tutees when i bumped into one of the differences of java and .NET. basically i declared a field variable as protected and was able to access the said field from a different class on the...
Published
Wed, Aug 08 2006 8:35 PM
by
jokiz
Filed under:
trivia
,
C#
,
java
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
Fri, Sep 09 2005 11:57 PM
by
jokiz
Filed under:
.NET
,
tips
,
C#
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
Fri, Sep 09 2005 11:48 PM
by
jokiz
Filed under:
.NET
,
C#
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
Tue, Sep 09 2005 9:43 AM
by
jokiz
Filed under:
.NET
,
C#
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
Tue, Sep 09 2005 10:26 AM
by
jokiz
Filed under:
.NET
,
C#
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
Sat, Jun 06 2005 6:04 PM
by
jokiz
Filed under:
.NET
,
C#
,
performance
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
Thu, Apr 04 2005 6:32 PM
by
jokiz
Filed under:
.NET
,
tips
,
C#
,
C
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
Fri, Mar 03 2005 11:24 AM
by
jokiz
Filed under:
.NET
,
tips
,
C#
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
Thu, Mar 03 2005 7:13 PM
by
jokiz
Filed under:
.NET
,
C#
,
C
,
performance
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
Mon, Jan 01 2005 5:34 PM
by
jokiz
Filed under:
.NET
,
techie
,
C#
,
C
Copyright DevPinoy 2005-2008