Showing posts with label VB.NET. Show all posts
Showing posts with label VB.NET. Show all posts
Friday, July 27, 2007

Enumeration in C#.NET,VB.NET

Enumeration is a great user defined data type in C#.Net and VB.NET. It is very useful in code readability. It greatly increases the readability of code.

here is the example of the enumeration that contains the weekdays.

In C#.NET...

public enum weekdays
{
Sunday=1,
Monday=2,
Tuesday=3,
Wednesday=4,
Thursday=5,
Friday=6,
Saturday=7
}

In VB.NET...

public enum weekdays
Sunday=1,
Monday=2,
Tuesday=3,
Wednesday=4,
Thursday=5,
Friday=6,
Saturday=7,
end enum
here is the code that we can use in VB.NET

Imports System.ComponentModel
Imports System.Diagnostics
Dim enumWeekday As weekdays
Dim i As Integer
i=2
enumWeekDay=Ctype(i,weekdays)
debug.writeline(enumWeekdays.ToString())

Same way we can write in C#.NET

using System.ComponentModel;
using System.Diagnostics;

Weekdays enumWeekDays;
int i;
i=2;
enumWeekday=(Weekdays) i;
debug.writeline(enumWeekdays.ToString());



So you can see the it greatly increase readability also saves time to write code with switch case and if else
Share:
Tuesday, July 24, 2007

Cool link for OOP in C#.NET

Share:

Advantages of inheritance in C#.NET,VB.NET

Following are some advantages of inheritance.

1. No need to write code from scratch. You can start coding with existing classes.
2. Through inheritance you can very easily convert small system into large systems
3. You can lots of classes with the same root but have different implementations of classes.
4. Code reusablity through inheritance increased.
5. Good at representing the objects
6. Inheritance provide a clear model structure which is easy to understand without much
complexity.
7. code are easy to manage and divided into parent and child classes.
Share:

Sealed class and abstract class in C#.NET and VB.NET

Sealed Class:

A sealed class is a class the does not allow inheritance . Means you can not inherit the sealed class . In VB.NET sealed class is represented as Non Inheritable class.

Abstract class:

Abstraction is process of identifying common patterns that have semantic variations . An abstraction represents the common patterns and provide means of variations you can use.

Abstract class methods does not have implementation. It just contain a structure.

Abstract class is equivalent to must inherit class in vb.net
Share:

Access Modifier in .net class

Following are the access modifier in class of .net framework.

1. Public

Allow access to class member from any other class.

2. Private

Allow access to class member from same class only.

3. Protected

Allow access to class member from same class and inherited classes.

4. Internal

Allow access to the class member in same Assembly.

5. Protected Internal

Allow access to class member in same class,inherited classes and classes in same Assembly.

6. Static

Indicates member can be called without instantiating the class.
Share:
Monday, July 23, 2007

Build SQL Server Stored Procedure with C#.NET

Traditionally from many year we have build sql server stored procedure with the transact sql. Microsoft framework 2.0 and sql server 2005 allows us to write stored procedure with other languages like C#.NET,VB.NET etc.

Microsoft sql server 2005 provide integrated support with .net common language run time so we can create stored procedure in C#.NET,VB.NET also. It has several advantages over using transact sql like compiled execution,security and type safety.

I have found a great articles that describes all the way to develop stored procedure with c#.net.

Mr. Bipin joshi describes all the tips and tracks of how to develop stored procedure with c#.net
here is the link for that article.

http://www.dotnetbips.com/articles/70eff218-3da0-4f6f-8f8d-eeea65193f2c.aspx
Share:
Thursday, July 12, 2007

Unraveling the Mysteries of .NET 2.0 Configuration

I have found a great link that desbries .net 2.0 configuration api in details. It is very easy handly and cool article.

here is the link for aritcle..
http://www.codeproject.com/dotnet/mysteriesofconfiguration.asp
Share:

Microsoft Enterprise library 3.1 released.

Enterprise Library 3.1 – May 2007 is a new release of the Microsoft patterns & practices Enterprise Library. The Enterprise Library is a collection of application blocks. These are reusable software components designed to assist developers with common enterprise development challenges. This release of the Enterprise Library includes two new application blocks, a software factory for creating application blocks and providers, and other new features and enhancements.

Here are the application blocks that are given with Microsoft enterprise library 3.1

  1. Caching Application Block
  2. Cryptography Application Block
  3. Data Access Application Block
  4. Exception Handling Application Block
  5. Security Application Block
  6. Logging Application Blcok
  7. Validation Application Block
  8. Policy Injection Application Block
  9. Application Block Software Factory

Microsoft Enterprise library works with .net framework 2.0 and 3.0

For more details about Microsoft enterprise 3.1 and other release version of Microsoft enterprise library. Please visit following link

http://msdn2.microsoft.com/en-us/library/aa480453.aspx

To download Microsoft enterprise library please visit following link:

http://www.microsoft.com/downloads/details.aspx?familyid=4c557c63-708f-4280-8f0c-637481c31718&displaylang=en

System requirements for Microsoft enterprise library 3.1 is as following:

Microsoft .net framework 2.0 or 3.0 (some application block does not work with .net framework 2.0)

Microsoft Visual Studio 2005 development system (any of the following editions):


Microsoft Visual Studio 2005 Standard Edition
Microsoft Visual Studio 2005 Professional Edition
Microsoft Visual Studio 2005 Team Edition for Software Developers
Microsoft Visual Studio 2005 Team Edition for Software Testers
Microsoft Visual Studio 2005 Team Edition for Software Architects
Microsoft Visual Studio 2005 Team Suite

To use the Application Block Software Factory and the Strong-Naming Guidance Package, you need the Guidance Automation Extensions (GAX). To modify these guidance packages, you also need the Guidance Automation Toolkit (GAT).

Share:
Tuesday, June 12, 2007

Introduction to XAML

Microsoft has provided new extensible markup language called XAML(Extensible Application Markup Language ) with .net framework 3.0.

XAML is used to define dynamic or static user interfaces of C# or VB.NET . XAML will be used in Windows Vista to design user interfaces, but can be applied to Windows XP or Windows 2003 as well.

I have found a great articles to describe basics of XAML.This article contains following topics.

1) Background of XAML
2) Advantages of XAML
3) XAML Developer Tools
4) Write First applicaiton with XAML
5) XAML Elements
6) XAML Attributes
7) Generate User Interface pragmatically through XAML

here is the link for that article...
http://aspalliance.com/1019_Introduction_to_XAML
Share:
Thursday, May 17, 2007

WPF - Hands on Labs

Microsoft Windows Foundation Presentation (WPF) hands on labs is a great labs to know more about Windows Presentation Foundation and How we should integrate it into the windows forms.

for all the details visit following links:
http://windowsclient.net/downloads/folders/hands-on-labs/default.aspx

Microsoft has provided following hands on labs

1) Building WPF Applications
2) Building WPF XAML Browser Applications
3) Creating 3D Content with Windows Presentation Foundation
4) Creating a Glass Button in Blend
5) Creating Rich 2D and 3D Content in WPF
6) Creating Rich Reading Experience with WPF
7) Creating Rich Reading Experience with WPF
8) Creating WPF buttons with Expression Blend and Expression Design
9) Expression Blend Feature Tour - Fabrikam Catalog
10)Using Data Binding in WPF

Happy Programming..
Share:

Windows Forms Video

For those who are new to the programming. Video Tutorials provides great helps. Microsoft has lots of videos on his new resource site. http://www.windowsclient.net/.

It has following videos...

1) Windows Presentation Foundation for Developers – Part 1
2) Design Rich Client Experiences with Expression Blend and WPF
3) A View from the Front: Real World Experiences of WPF and Silver light
4) Starbucks, Windows Presentation Foundation, and Stand Out: Remarkable Brand Delivers Remarkable Presentations
5) ZAP!, WHAM!, KAPOW!: Windows Presentation Foundation and the Next Generation of Online Comic Book Reading
6) Citius, Altius, Fortius: Windows Presentation Foundation and the 2008 Olympic Games
7) Lessons Learned: Designer/Developer Productivity in Windows Presentation Foundation
8) Family Show: I See Dead People, with Windows Presentation Foundation
9) Windows Presentation Foundation in Real World Development
10) WPF State of the Nation
11) Interactive 2D controls on WPF 3D Surfaces
12) Creating a Simple XAML Browser Application
13) Advent and Evolution of WPF
14) IronPython and WPF
15) The Power of Templates in Windows Presentation Foundation
16) Sneak Peak at Cider
17) Testing WPF - UI Fuzzing with InvokeStress
18) Demo of Avalon 3D
19) Expression – Part One: The Overview
20) Expression – Part Two: Design
21) Expression – Part Three: Blend
22) Windows Forms Layout
23) Tool Strips
24) Windows Presentation Foundation: The Opportunity for WPF Applications in the ...
25) Developing a Windows Presentation Foundation Application
26) A Designer's Overview of Windows Presentation Foundation
27) Building a Real World WPF Application: The North Face In-Store Explorer

For more details about the videos please visit following link:
http://windowsclient.net/learn/videos.aspx

Happy Programming...
Share:

1.0 windows starter kits from windowsclient.net

Just like the asp.net starter kits windows forms starter kits provide a very good way to learn windows forms programming. Those who are new to the windows forms programming by .net technology must have the windows forms start kits.

Windows starter kits include following applications...

1) Auto-Column-Size Windows Forms DataGrid
2) DataGrid ComboBox Column
3) FotoVision
4) Infragistics Tracker Application
5) IssueVision
6) ITypedList Implementation
7) TaskVision 1.0
8) Terrarium

To know more about start kits please visit:
http://windowsclient.net/downloads/folders/starterkits/default.aspx

or directly download starter kits from above links..

Happy Programming.
Share:
Wednesday, March 28, 2007

Write better window application

here is the another link for writing better windows application...

http://www.ssw.com.au/ssw/Standards/Rules/RulesToBetterWindowsForms.aspx
Share:

Databinding in .NET Applications

Data binding provides a way for developers to create a read/write link between the controls on a form and the data in their application (their data model). There are several ways to bind datasource with controls i have found very inersting link that covers all the aspects of databinding..

here is the link.....

http://www.akadia.com/services/dotnet_databinding.html
Share:

Creating Collections for Data Binding and Serialization

Collection are faster then the any datasource like dataset, data reader. So it must be used to bind control in application rather then other datasources. I have found very ineresting article series written by Thiru Thangarathinam which discusss how to create collection and how to bind it with controls.

here is the link:
http://www.15seconds.com/issue/040210.htm
Share:

Increase your windows forms application performance

With microsoft.net technology and windows forms 2.0 you can build great application. It provides great user interface component so you can develope very reach applications.

There are two aspects of application design and another one is performance. If any of this two is not perfect then your application may lead to a failure.

I have found one interesting link that discuss about this issues. It discuss all aspects realted to design and performance. It discuss about common performance-critical scenarios such as startup, control population, and control painting to boost your application performance and make it user responsive.

here is the link:

http://msdn.microsoft.com/msdnmag/issues/06/03/windowsformsperformance/default.aspx
Share:
Wednesday, February 28, 2007

ASP.NET Ajax Videos

Ajax is one of most hot and upcoming technologies for web developement plateform. Microsoft has launched its ajax development kit . With it you can easily create ajax enabled application with asp.net . With help it takes few mintues to convert existing asp.net application to ajax enabled asp.net application.

Microsoft also lauched some tutorial and video with it's How do I ajax video series. It is 25 video which cover all aspects of ajax development.

Any one can download it with following links.

http://www.asp.net/learn/videos/default.aspx?tabid=63
Share:

C#-VB.NET name spaces

I have found one interesting things name spaces. Name space help us to organize our code in better way.

You should create name space as following.

company.product.layer.section
Share:
Tuesday, February 20, 2007

Directly Binding Dataset with Datagrid View

With windows forms 2.0 you can directly bound the datagrid with dataset.

For example,

your dataset name is 'dt'

First fill your dataset with data.

Then select datagridview and create the columns and in the datamember property of each give the name of column you want to bind.

just write the following code.

For example you datagrid code is dg

dg.DataSource=dt;
dg.Refresh();

That's it you have bound the datagrid with dataset
Share:
Thursday, February 1, 2007

Developing n-tier application with Microsoft.NET

There are lots of debates and information about developing n-tier application using Microsoft .net framework. Every one has its own mechanism. I found a interesting article at Microsoft site. It is very good and with the source code.

Here are the link for that article:

http://www.microsoft.com/belux/msdn/nl/community/columns/hyatt/ntier1.mspx

It explains every aspects of developing n-tier application with Microsoft .net framework.

Happy Programming
Share:

Support this blog-Buy me a coffee

Buy me a coffeeBuy me a coffee
Search This Blog
Subscribe to my blog

  

My Mvp Profile
Follow us on facebook
Blog Archive
Total Pageviews