Browse by Tags
All Tags »
C# (
RSS)
In my last posting I introduced new ReadLines() method and new overloads for WriteAllLines() method of File class . But there are more new stuff in System.IO namespace . In .Net Framework 4.0 Directory and DirectoryInfo class are able to enumerate files...
.Net Framework 4.0 adds also some new and cool features to file system objects. File class has now ReadLines() methods that returns IEnumerable<string>. WriteAllLines() methods has two overload methods that accept IEnumerable<string> instead...
.Net Framework 4.0 Beta 2 has new IsNullOrWhiteSpace() method for strings generalizes IsNullOrEmpty() method to incluse also other white space besides empty string. In this posting I will show you simple example that illustrates how to use IsNullOrWhiteSpace...
.Net Framework 4.0 Beta 2 introduces new class in System.Numerics namespace: Complex . Complex represents complex numbers and enables different arithmetic operations with complex numbers. In this posting I will show you how to use complex numbers in ...
I used LINQ to solve the following problem: find all titles of objects at hierarchy level X when you know object ID in hierarchy level Y. I cannot imagine if there is some other solution that is same short and clear as one that LINQ provides. Take a look...
JQuery and web development Limit Number of Characters in a TextArea using jQuery Find out which Key was pressed using jQuery jQuery Superfish Menus Plug-in Make website images look like a video with this CSS effect CSS2 – opacity Mobile 55 per cent of...
C# 4.0 supports optional method arguments. Related to this is support for named parameters in function calls. For us it makes easier to use methods which have long argument list. It also introduces some new dangers which may lead us to messy and hard...
Agile Principles, Patterns, and Practices in C# by Robert C. Martin and Micah Martin describes how to write software using C#. Book covers also most important design patterns and object-oriented development principles. There are very good, close...
Yesterday I wrote about Repeat extension method for strings . Today I offer you shorter and faster version of it. C# /// <summary> /// Repeats the specified string n times. /// </summary> /// <param name="instr"> The input...
I needed str_repeat() functionality in one of my C# methods. As .Net currently doesn’t offer it I wrote my own Repeat() extension method for strings. Here you can find C# and VB.NET versions. Make sure you put the method inside static class . C# /// <summary>...
More Posts
Next page »