Message from the CTO

Message from the CTO

We’re all beginners at some stage

In writing my chapters of Professional DevExpress ASP.NET Controls, I suddenly realized that there is really no way anymore to know everything about the OS, the platform, the run-times, or the language we use in our daily work. Sure, way back in the days of MS-DOS 6.22, you stood some chance of knowing most of it, but nowadays, especially as we’re now learning more and more about Visual Studio 2010 and .NET 4, there’s no possibility to make the time to learn it all, let alone say you know it.

Given that axiom, surely it makes sense that, if we are to use some fancy new tech in our app, we should spend some time in learning about said tech? For example, I hadn’t actually written a web app that used AJAX before I wrote that part of the book. I could have just gone to our devs, thrown my weight around (it is considerable) and ordered them to make me an app or two and tell me how they did it, chop chop, but I decided to drop out and learn what it was all about through reading the documentation and writing some silly little throwaway apps.

Too often we don’t do that, and too often we get irritated that something doesn’t work the way we expect. Like everyone, I’d love for all software to be so intuitive that you don’t have to crack open the help, but that utopia is very much in the future. Heck, even some iPhone apps aren’t that intuitive.

The ability we should be cultivating within ourselves, then, is the ability to research, to experiment, and to learn about new software and not just take it on trust that we know innately how it works. This is the new job aptitude of the 21st century.
Julian M Bucknall, CTO
Comment on Julian’s message

Silverlight vs Flex vs JavaFX from Google Trends

I was inspired by the Mike Slinn’s experiment and I have extended it a bit and I’ve compared trends for Adobe Flex, Silverlight and JavaFX jobs on and on Google Trends.

Scale is based on the average worldwide traffic of “silverlight” in all years. Learn more

“adobe flex”


you can go at:

What’s New in the Visual C# 2008

The C# 3.0 language and compiler introduce several new language features. These new language constructs are useful individually in various contexts, and collectively for doing Language-Integrated Query (LINQ).

The following table lists the new C# 3.0 language features:

Feature Description
Implicitly Typed Local Variables and Arrays When used with local variables, the var keyword instructs the compiler to infer the type of the variable or the array elements from the expression on the right side of the initialization statement.
Object Initializers Enables object initialization without explicit calls to a constructor.
Collection Initializers Enables initialization of collections with an initialization list rather than specific calls to Add or another method.
Extension Methods Extend existing classes by using static methods that can be invoked by using instance method syntax.
Anonymous Types Enables on-the-fly creation of unnamed structured types that can be added to collections and accessed by using var.
Lambda Expressions Enables inline expressions with input parameters that can be bound to delegates or expression trees.
Query Keywords Keywords that specify clauses in a query expression:

  • from clause(s)
  • where clause (optional)
  • ordering clauses (optional)
  • join clause (optional)
  • select or group clause
  • into clause (optional)
Auto-Implemented Properties Enables declaration of properties by using simplified syntax.
Partial Method Definitions Partial types may now contain partial methods.

Visual C# IDE

Feature Description
Multi-targeting Visual Studio 2008 enables you to specify a version of the .NET Framework for your project, .NET Framework 2.0, 3.0, or 3.5. The .NET Framework target of an application is the version of the .NET Framework that is required on a computer to enable the application to run on that computer.
New Project Types and Templates Several new project templates are provided for Windows Presentation Foundation, Windows Communication Foundation, and Web projects.
IntelliSense support for C# 3.0 The Visual C# code editor provides statement completion and Quick Info to support the following new language constructs in C# 3.0:

  • Implicitly Typed Local Variables
  • Query Expressions
  • Extension Methods
  • Object/Collection Initializers
  • Anonymous Types
  • Lambda Expressions
  • Partial Methods

For more information, see Visual C# IntelliSense.

Refactoring Support for C# 3.0 The refactoring features, Rename, Signature Change, Extract Method, and Promote Local have been updated to support the following new language constructs:

  • Query Expressions
  • Extension Methods
  • Lambda Expressions

In addition, refactoring provides new options and warnings to help prevent unintended consequences from a refactoring action.

Code Formatting The code editor supports formatting options for several new C# 3.0 language constructs including query expressions.
Organizing Using Statements The Visual C# code editor provides an easy way to sort using and extern declarations and remove those that are not being used.
Posted in CSharp. Tags: , . 1 Comment »

What’s New in the C# 2.0

With the release of Visual Studio 2005, the C# language has been updated to version 2.0, which supports the following new features:

Generic types are added to the language to enable programmers to achieve a high level of code reuse and enhanced performance for collection classes. Generic types can differ only by arity. Parameters can also be forced to be specific types. For more information, see Generic Type Parameters.
Iterators make it easier to dictate how a foreach loop will iterate over a collection’s contents.
Partial Classes
Partial type definitions allow a single type, such as a class, to be split into multiple files. The Visual Studio designer uses this feature to separate its generated code from user code.
Nullable Types
Nullable types allow a variable to contain a value that is undefined. Nullable types are useful when working with databases and other data structures that may contain elements that contain no specific values.
Anonymous Methods
It is now possible to pass a block of code as a parameter. Anywhere a delegate is expected, a code block can be used instead: there is no need to define a new method.
Namespace alias qualifier
The namespace alias qualifier (::) provides more control over accessing namespace members. The global :: alias allows access the root namespace that may be hidden by an entity in your code.
Static Classes
Static classes are a safe and convenient way of declaring a class containing static methods that cannot be instantiated. In C# version 1.2 you would have defined the class constructor as private to prevent the class being instantiated.
External Assembly Alias
Reference different versions of the same component contained in the same assembly with this expanded use of the extern keyword.
Property Accessor Accessibility
It is now possible to define different levels of accessibility for the get and set accessors on properties.
Covariance and Contravariance in Delegates
The method passed to a delegate may now have greater flexibility in its return type and parameters.
How to: Declare, Instantiate, and Use a Delegate
Method group conversion provides a simplified syntax for declaring delegates.
Fixed Size Buffers
In an unsafe code block, it is now possible to declare fixed-size structures with embedded arrays.
Friend Assemblies
Assemblies can provide access to non-public types to other assemblies.
Inline warning control
The #pragma warning directive may be used to disable and enable certain compiler warnings.
The volatile keyword can now be applied to IntPtr and UIntPtr.

The C# compiler introduces the following additions and changes for this release:

/errorreport option
Can be used to report internal compiler errors to Microsoft over the Internet.
/incremental option
Has been removed.
/keycontainer and /keyfile options
Support specifying cryptographic keys.
/langversion option
Can be used to specify compatibility with a specific version of the language.
/linkresource option
Contains additional options.
/moduleassemblyname option
Allows you to build a .netmodule file and access non-public types in an existing assembly.
/pdb option
Specifies the name and location of the .pdb file.
/platform option
Enables you to target Itanium Family (IPF) and x64 architectures.
#pragma warning
Used to disable and enable individual warnings in code.

Source from MSDN Library

Accessing Individual Characters in C#

You can use array notation with an index value to acquire read-only access to individual characters, as in the following example:

string s5 = "Printing backwards";

for (int i = 0; i < s5.Length; i++)
    System.Console.Write(s5[s5.Length - i - 1]);
// Output: "sdrawkcab gnitnirP"

If the String methods do not provide the functionality that you must have to modify individual characters in a string, you can use a StringBuilder object to modify the individual chars “in-place”, and then create a new string to store the results by using the StringBuilder methods. In the following example, assume that you must modify the original string in a particular way and then store the results for future use:

System.Text.StringBuilder sb = new System.Text.StringBuilder(question);

for (int j = 0; j < sb.Length; j++)
    if (System.Char.IsLower(sb[j]) == true)
        sb[j] = System.Char.ToUpper(sb[j]);
    else if (System.Char.IsUpper(sb[j]) == true)
        sb[j] = System.Char.ToLower(sb[j]);
// Store the new string.
string corrected = sb.ToString();
// Output: How does Microsoft Word deal with the Caps Lock key?            

Declaring and Initializing Strings

You can declare and initialize strings in various ways, as shown in the following example:

// Declare without initializing.
string message1;

// Initialize to null.
string message2 = null;

// Initialize as an empty string.
// Use the Empty constant instead of the literal "".
string message3 = System.String.Empty;

//Initialize with a regular string literal.
string oldPath = "c:\\Program Files\\Microsoft Visual Studio 8.0";

// Initialize with a verbatim string literal.
string newPath = @"c:\Program Files\Microsoft Visual Studio 9.0";

// Use System.String if you prefer.
System.String greeting = "Hello World!";

// In local variables (i.e. within a method body)
// you can use implicit typing.
var temp = "I'm still a strongly-typed System.String!";

// Use a const string to prevent 'message4' from
// being used to store another string value.
const string message4 = "You can't get rid of me!";

// Use the String constructor only when creating
// a string from a char*, char[], or sbyte*. See
// System.String documentation for details.
char[] letters = { 'A', 'B', 'C' };
string alphabet = new string(letters);

Posted in CSharp. Tags: . Leave a Comment »

Numbers Postfix Program

static void Main(string[] args)
int no;
string con;
Console.WriteLine(“Enter No:”);
string input = Console.ReadLine();

int i = Int32.Parse(input);
if (i > 100)
no = i % 100;
if ((no > 10) && (no < 20))
no = 0;
no = i % 10;
no = i % 10;
switch (no)
case 0:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
Console.WriteLine(“Output:” + input + “th”);
case 1:
Console.WriteLine(“Output:” + input + “st”);
case 2:
Console.WriteLine(“Output:” + input + “nd”);
case 3:
Console.WriteLine(“Output:” + input + “rd”);
Console.WriteLine(“To exit:Y/N”);
con = Console.ReadLine();
} while (con!= “y”);