Monthly Archive: February 2009

Feb 15

What are the options for formatting a string? What are the options for formatting when using .ToString()?

What are the options for formatting a string? What are the options for formatting when using .ToString()? If you are using the .NET Framework you probably know that it was designed to make your life easy. Many modern programming languages are catching up with the idea and providing many pre-built features to facilitate the regular …

Continue reading »

Feb 15

What are the differences between databinding expressions: Eval and Bind?

I have seen sample code when doing data binding on controls that use either Eval and Bind. I was wondering what is the difference between both of them. When should you use Eval instead of Bind and viceversa?

Feb 15

How do you enumerate through a Enum?

I am trying to perform an action for each item inside an Enumeration. In other words, I want to be able to use the foreach statement with an enumeration. How do you loop with foreach through an Enum?

Feb 13

How can you create string templates (placeholders) for your application in C#.net?

I am looking for a way to establish error message templates and have parameters become part of the message. Just concatenating a string on the fly is not a very clean approach to this problem and I'm sure there is a better way to address this. The idea is that the messages can be easily …

Continue reading »