Posts Tagged ‘visual studio 2008’

Nevron Vision 2009

Nevron has announced the immediate availability of the new major version release (2009 Vol.2) of Nevron SSRS Vision suite – the leading Data Visualization suite for SQL Server Reporting Services 2005 and 2008. In 2009 Vol.2 we have introduced many improvements in the Chart for SSRS and the new Nevron Gauge for SSRS – 8 new Charting Types with many variations, complete set of Gauge Types, Gauge Formulas, Save/Load Chart and Gauge Templates, Code Customization which allows you to use the full Nevron Chart for .NET API in SSRS and much more.

For full details about this new major release, please visit http://www.nevron.com/Nevron.Company.NewsAndEvents.NevronNews.aspx

Nevron SSRS Vision suite includes two products – Nevron Chart for Reporting Services and Nevron Gauge for Reporting Service. Below are the product URLs:
Nevron SSRS Vision suite (SSRS 2005/2008)

http://www.nevron.com/Products.SQLServerReportingServices.Overview.aspx

Nevron Chart for Reporting Services (SSRS 2005/2008)
http://www.nevron.com/Products.ChartForSQLReportingServices.Overview.aspx

Nevron Gauge for Reporting Services (SSRS 2005/2008)
http://www.nevron.com/Products.GaugeForSQLReportingServices.Overview.aspx



Be the first to comment - What do you think?  Posted by Anand Narayanaswamy - September 8, 2009 at 12:50 am

Categories: News, Press Releases   Tags: , , , , ,

How do I build a C# application using Command Line Compiler?

Microsoft’s .NET SDK ships with a command line compiler called csc.exe. It can be executed from within the DOS prompt. In this article, I will show you how to build a simple C# program using this compiler with Notepad as the editor.

Open your editor and enter the code as given in listing 1

Listing 1

001: // HelloWorld.cs
002: // -------------
003: using System;
004: class HelloWorld
005: {
006: public static void Main()
007: {
008: Console.WriteLine("Hello World");
009: }
010: } 

The line numbers are given only for the sake of explanation and does not form part of the source code.

In the above listing, Line 3 defines the namespace System. Line 4 declares our class named HelloWorld. Line 6 defines the Main() method, which is considered as a entry point for all C# programs. Line 8 calls the WriteLine() method of the Console class and prints "Hello World" as output.

Save the file as HelloWorld.cs and compile the code using a C# compiler. I assume you are using the compiler which ship with .NET SDK. For this purpose, you have to give the following command at the DOS prompt as shown in the figure given below

csc HelloWorld.cs 

Figure 1

c#, visual c#, visual studio, mono

If you have installed Visual Studio 2008, you can compile a C# program using Visual Studio Command Prompt. You can launch it from Start | All Programs | Microsoft Visual Studio 2008 | Visual Studio Tools

If you have installed Mono C# Compiler then you should compile the above program using the following command:

mcs HelloWorld.cs 

If there are any errors and warnings, the compiler will display them during the above process. You have to go through all those messages and correct them preferably by going back to the source code. As explained earlier, C# is a case sensitive language and hence even if you miss a semicolon or a comma, the compiler will throw error messages. If there are no errors and warnings your screen would look like as shown in the figure given above.

To view the output of the above program, you have to supply the name of the assembly (HelloWorld.exe) at the DOS prompt.

For example, you have to give the following command for executing the above program.

HelloWorld 

The output will be as shown in the figure given below

Figure 2

c#, visual c#, visual studio, mono

For mono compiler, the execution statement will be as shown below:

mono HelloWorld.exe 

An Assembly is a file which is created by the compiler upon successful compilation of every C# application.

Commenting the Code

If you look at line numbers 1 and 2 in the above code, you would see two slash lines at the beginning. In programming terminology, these lines are called as comments. C# compiler won’t compile the statements inside these comments and they are given only for documentation and reference purposes. It is a best practice to give comments while coding as it will help you to study the code at a later stage or for others who look at your code.

There are three ways by which you can give comments in C#. The first two will be already familiar to you if you had worked with C++ and Java. They are single-line and multiline comments.

Single-line comments are given with the symbol //, while Multiline comments are applied with /*…..*/ symbols and can spread more than one line (See Listing 2)

Listing 2

// this is a single line comment
/*
This is a
Multiline
Comment
*/

The third type of comment which is given with “///” is a new one introduced by the .NET Framework. It is used to generate documentation for your C# program and they are denoted by using the relevant XML tags as shown in listing 3:

Listing 3

/// <summary>
/// this is a new comment system
/// <summary>

 

microsoft, c#, java

Technorati Tags: , ,

3 comments - What do you think?  Posted by Anand Narayanaswamy - June 22, 2009 at 7:57 am

Categories: C#, Channels, Latest   Tags: , , , ,

What are the different editors that are available for C# programming?

Once you have installed a C# compiler, the next process is to choose an editor to enter source codes. There are different types of editors such as Notepad and Visual C#. In addition to these two, many third party vendors have also developed editors for programming with C#. This FAQ briefly discusses each one of these editors.

Notepad is a commonly used editor among many programmers. It comes with Windows and it is very easy to use as well. But there are lots of disadvantages with this editor like it doesn’t supports syntax coloring and other features such as intellisense. Moreover, you cannot directly compile and execute a C# program from within the editor. Although it doesn’t support features such as line numbering, you can jump to a specific line of the code by using the CTRL+G shortcut.

Microsoft Visual Studio is a full featured development tool and it includes project templates for all .NET languages in an Integrated Development Environment (IDE). Other than C#, the IDE supports the development of major .NET languages such as Visual Basic , Visual J#  and Visual C++. In other words, it provides a single development environment for all these languages. You need to master the various elements found on the IDE such as Toolbox, Properties window apart from learning the C# language.

Will I get Visual C# as a separate product?

Yes. Microsoft sells a standard version of the product named “Visual C# .NET Standard Edition” at a reduced price. It comes with four CD’s along with a printed manual. This product doesn’t supports advanced features such as Crystal Reports which is available with Visual Studio. This product is a big boon for developers with limited budget.
Visual C# .NET provides you with the required templates and wizards for building applications. It also supports features such as Intellisense and Dynamic Help. Dynamic Help is a new functionality which will provide you help according to the relevant situation while developing a project. It will be available only if you have installed MSDN Library collection. Moreover, it ships with powerful debugging capabilities and automatic syntax/clause completion features. For instance, if you enter the keyword “try”, remaining clauses like catch and finally will be automatically get listed on the code editor.

What do you mean by IntelliSense?

IntelliSense refers to popping up of methods and properties according to the context. For instance, if you enter Console followed by a dot, a menu automatically pops up, which gives you all the methods and properties of the Console class. You should already be aware of this useful feature, if you had used any of the languages in Visual Studio 6.0.

Where will I get MSDN Library?

MSDN Library ships with all editions of Visual Studio. You will be automatically prompted to install the same after the installation of Visual Studio. You will get periodic updates of the library if you have subscribed to MSDN. Alternatively, you can access the library online at any time. The biggest advantage of using Visual C# is that it significantly reduces the development time of projects by integrating all parts of a project under a single roof. Even though there are lots of benefits, Visual C# is not compulsorily required for programming with C#.

In addition to Visual C#, many third party vendors have also released editors for C#. They can be downloaded from the websites of the respective vendors. One of the most popular editors is SharpDevelop. It supports syntax coloring, compilation and execution from the IDE apart from other features. With the help of this editor, you can also build Visual Basic, User controls and Web Services applications. You can also create XML and XSL files. Moreover, the developers of SharpDevelop have provided the complete source code for this editor under an Open Source License Agreement. The product and its source code can be downloaded from www.isharpdevelop.com.

Another editor is Antechinus C# editor developed by c-point but it is not as much popular due to its limited capabilities. Some of the other popular editors are given below

Borland C# Builder
CodeWright
EditPlus

Even though there are many editors available on the market its up to you to decide which editor to use. I strongly recommend you to install one editor and learn the language completely.

3 comments - What do you think?  Posted by Anand Narayanaswamy - June 12, 2009 at 12:29 am

Categories: C#, Channels, Latest   Tags: , , , , , , ,

How do I begin programming with C#?

First of all, you need to install a C# compiler. You can either use a command line compiler available from Microsoft or third party compiler kit developed by Mono. Microsoft’s C# compiler is widely used by many developers as the Mono compiler kit is not yet fully developed. In addition to this you can also build C# applications with Visual C# 2008, which is available with Visual Studio 2008. It is a robust development tool used for developing all kinds of C# applications.

Is it necessary to install Visual Studio 2008 to build C# applications?

Not necessary. A command line compiler is sufficient to learn C#. Visual C# is only used to simplify the development process. Microsoft’s C# compiler is available in the form of a package called Software Development Kit (SDK). A latest version of this kit can be downloaded from http://www.microsoft.com/downloads. You will also find this kit along with many programming magazine CD’s or from popular C# books such as Sams Teach Yourself the C# language in 21 Days by Brad Jones.

After the kit has been downloaded, you have to install it. The installation process normally takes between 15-30 minutes depending upon the speed of your computer and is self explanatory. The setup will automatically register the required environment variables and hence you can straight away start programming with C# after the completion of its installation.

Is it necessary to install .NET SDK and Visual Studio 2008 separately?

If you have installed Visual Studio 2008 on your system, then there is no need to install .NET SDK separately as it will be automatically installed as a prerequisite during the installation of Visual Studio. To test whether .NET Framework has been successfully installed on your system, go to Visual Studio 2008 Command Prompt and enter csc. If the system returns a fatal error message with the code CS2008 then the installation is perfect. All C# error messages are documented with codes. These messages will become familiar to you as you gain more experience with C#.

In addition to Microsoft’s C# compiler you also have an option to install Mono C# compiler kit available from http://www.mono-project.com/Main_Page. Mono is a project started to create .NET compilers meant for platforms other than Windows, such as Linux. But the project is still under development and with each release of the kit more features and additional support for namespaces are added. The upcoming version of this kit promises to provide support for Windows Forms, ASP.NET and ADO.NET. Moreover, the new compiler will also provide database connectivity support for MySQL databases.

Can I install Mono C# compiler kit under Windows?

Yes. While Microsoft’s .NET SDK has been designed to work with Windows, Mono C# kit can be installed in both Windows and Linux.

Be the first to comment - What do you think?  Posted by Anand Narayanaswamy - June 2, 2009 at 7:03 am

Categories: C#, Channels, Latest   Tags: , , ,

Working with Multiple Forms using Visual C# 2008

You will need to work with more than one form while developing Windows based applications in C#. In this code snippet, Anand examines the steps required using Visual C# 2008.

Read more...

1 comment - What do you think?  Posted by Anand Narayanaswamy - May 25, 2009 at 7:40 am

Categories: Codehut, Latest   Tags: , , ,

FAQ 4 – What is Common Language Runtime?

Common Language Runtime shortly called as CLR provides a universal execution engine for .NET applications and it is provided by the .NET Framework. Every target computer should require CLR for executing .NET applications. One of the most interesting points to note is that the CLR itself manages the life of objects. This is the effect of Automatic Garbage Collection system built into it. When the CLR finds an object that is not being used, it destroys them and thus freeing memory allocation.

The corresponding compilers (C#, Visual Basic .NET) generate meta code upon successful compilation. This meta code contains lot of information about code types, its members and references used. The CLR generates Simple Object Access Protocol (SOAP) when it makes remote procedure calls. SOAP is a protocol used to access .NET Web Services. In addition to the garbage collection, CLR also provides support for Managed Code, Effective Memory Management, Type Safety Verification, Conversion of IL to native code, Structured Exception Handling and Effective Interoperability between COM components and Unmanaged Code. You can build secured applications using the runtime since the .NET Framework provides support for advanced security features as well.

Be the first to comment - What do you think?  Posted by Anand Narayanaswamy - May 13, 2009 at 12:41 am

Categories: C#, Channels, Latest   Tags: , , , , , , ,

FAQ 3 – What is C#?

C#, pronounced as C-Sharp, is one of the powerful programming languages provided by the .NET Framework. According to Microsoft “C# is a modern, object-oriented language that enables programmers to quickly build a wide range of applications for the new Microsoft .NET platform, which provides tools and services that fully exploit both computing and communications”. The main brains behind C# were Anders Hejlsberg and Scott Wiltamuth. However, many other personalities like Rob Howard, Scott Guthrie were also involved behind C# and the .NET Framework. The programming language has been standardized by European Computer Manufactures Association (ECMA).

Microsoft originally released beta versions of .NET Framework to get feedback about the product from developers and customers. Based on the massive response and suggestions received from them for the first beta, Microsoft released second beta in early 2001. Finally, they released final versions of C# under the name, .NET Framework 1.0 in 2002 and that of 1.1 in 2003. With each release, the product shipped with improved features for developing secured and scalable applications along with high quality documentation.

Be the first to comment - What do you think?  Posted by Anand Narayanaswamy - at 12:37 am

Categories: C#, Channels, Latest   Tags: , , , , ,

FAQ 2 – What is Microsoft .NET?

Microsoft .NET is one of the latest and powerful technologies introduced by Microsoft Corporation. It is comprised of several programming languages and each of these languages works under a common framework called .NET Framework. Developers had faced lot of difficulties while working with earlier languages. These difficulties were completely eliminated with the introduction of .NET. Microsoft .NET platform comprises of core components like .NET building block services such as Passport .NET, .NET device software’s that will run on latest Internet devices like mobile phones, handhelds and pocket PC’s. You can also integrate the .NET technology into self describing documents like XML. For example, you can manipulate XML documents using any one of languages under the .NET Framework. Passport .NET provides a single window access to all Microsoft Resources like Hotmail, Microsoft Chat, MSDN subscriber downloads and others.

1 comment - What do you think?  Posted by Anand Narayanaswamy - May 12, 2009 at 5:40 am

Categories: C#, Channels, Latest   Tags: , , ,

Fix: A project with an Output type of Class Library cannot be started directly

You will sometimes come across the following error in a message box if you execute an ASP.NET application using Visual Studio 2005/2008

A project with an Output type of Class Library cannot be started directly. In order to debug this project, add an executable project to this solution which references the library project. Set the executable project as the startup project. 

Resolution

In order to fix the above error, right click the Solution name in Visual Studio 2005/2008 and select Set as StartUp Project option from the popup menu.

Applicability

Visual Studio 2005
Visual Studio 2008

5 comments - What do you think?  Posted by Anand Narayanaswamy - April 27, 2009 at 12:35 am

Categories: ASP.NET, Channels, Latest   Tags: , ,

PR – Murach’s ADO.NET 3.5, LINQ, and the Entity Framework with VB 2008

Mike Murach & Associates has just published a new edition of their popular ADO.NET book. Now entitled Murach’s ADO.NET 3.5, LINQ, and the Entity Framework with VB 2008, it covers what today’s Visual Basic developer needs to know to create database applications the way the best professionals do. Here are some highlights:

murach_ado_net_35 #1: For rapid application development and prototyping…
This book shows how to use the ADO.NET tools, like data sources and the DataGridView control, that enable developers to create working database applications in a minimum of time, with a minimum of coding.

#2: For serious production applications…
This book shows how to go beyond the RAD tools, using heavy-duty ADO.NET coding and object data sources to build 3-layer applications that consist of presentation, business, and database classes.

#3: For incorporating LINQ into Windows and web applications…
This book has a 6-chapter section that’s a short course in LINQ, the .NET 3.5 feature that provides a consistent way to query different types of data. This section covers LINQ to Objects, LINQ to DataSet, LINQ to SQL, LINQ data source controls for web applications, and LINQ to XML.

#4: For database programming with the Entity Framework…
This book gets developers going with the Entity Framework, the .NET 3.5 feature that may change the way you do database programming. Entity Framework (EF) provides a flexible model for mapping the business objects in an application to database objects, and it generates a lot of the code that has to be written from scratch otherwise. A 4-chapter section shows how to create an Entity Data Model and work with it using LINQ to Entities, Entity SQL, and Entity data source controls for web applications.

#5: For training and reference: The “paired-pages” format…
This book uses Murach’s standard format to present the content in 2-page spreads, pairing a page of explanation with an illustrative page of syntax, screen shots, coding examples, and bulleted guidelines. Developers report that this lets them read less to get information faster, whether they use the book for training or reference.

Murach’s ADO.NET 3.5, LINQ, and the Entity Framework with VB 2008 is available directly from the publisher at www.murach.com and from all major retail outlets.

Murach’s ADO.NET 3.5, LINQ, and the Entity Framework with VB 2008
Author: Anne Boehm
Pages: 708  – ISBN: 978-1-890774-52-3 – Price: $52.50

Be the first to comment - What do you think?  Posted by Anand Narayanaswamy - April 6, 2009 at 10:22 am

Categories: Latest, News, Press Releases   Tags: , , , , , , ,