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 Indeed.com and on Google Trends.

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

“adobe flex”
0.18
“silverlight”
1.00
“javafx”
0.08

viz

you can go at: http://www.google.com/trends?q=%22adobe+flex%22%2C+%22silverlight%22%2C+%22javafx%22

Advertisements

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:

Generics
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
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.
volatile
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:

C#
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:

C#
string question = "hOW DOES mICROSOFT wORD DEAL WITH THE cAPS lOCK KEY?";
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();
System.Console.WriteLine(corrected);
// 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:

C#
// 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;
do
{
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;
else
no = i % 10;
}
else
no = i % 10;
switch (no)
{
case 0:
case 4:
case 5:
case 6:
case 7:
case 8:
case 9:
Console.WriteLine(“Output:” + input + “th”);
break;
case 1:
Console.WriteLine(“Output:” + input + “st”);
break;
case 2:
Console.WriteLine(“Output:” + input + “nd”);
break;
case 3:
Console.WriteLine(“Output:” + input + “rd”);
break;
}
Console.WriteLine(“To exit:Y/N”);
con = Console.ReadLine();
} while (con!= “y”);
Console.Read();
}


Search Strings Using Regular Expressions

The System.Text.RegularExpressions.Regex class can be used to search strings. These searches can range in complexity from very simple to making full use of regular expressions. The following are two examples of string searching by using the Regex class.

C#
class TestRegularExpressions
{
    static void Main()
    {
        string[] sentences =
        {
            "C# code",
            "Chapter 2: Writing Code",
            "Unicode",
            "no match here"
        };

        string sPattern = "code";

        foreach (string s in sentences)
        {
            System.Console.Write("{0,24}", s);

            if (System.Text.RegularExpressions.Regex.IsMatch(s, sPattern, System.Text.RegularExpressions.RegexOptions.IgnoreCase))
            {
                System.Console.WriteLine("  (match for '{0}' found)", sPattern);
            }
            else
            {
                System.Console.WriteLine();
            }
        }

        // Keep the console window open in debug mode.
        System.Console.WriteLine("Press any key to exit.");
        System.Console.ReadKey();

    }
}
/* Output:
           C# code  (match for 'code' found)
           Chapter 2: Writing Code  (match for 'code' found)
           Unicode  (match for 'code' found)
           no match here
*/