a const member's value is defined at compile time.
a readonly member's value can be set at runtime as well as compile time.
static means the member is not tied to the instances of the class. There exists only one copy of the static member regardless of the number of instances.
Monday, March 10, 2008
Thursday, December 27, 2007
Design Patterns
Creational:
Abstract Factory: Creates concrete instances of classes.Singleton:
Creates a single instance of a class and ensures there is only one instance in the system.
Class contruction: Keep a private member in the class and let the constructor initialize it only if that member is null.
Application: System resources; there is only one printer in the system and we must access it thru singleton pattern.
Structural:
Facade: Represents an entire system of subclasses.
Proxy: Not the real object itself, just represents the real object.
Behavioral:
Command:
A command request is encapsulated as an object.
Observer:
Notifies changes to classes.
Application: Error logging.
Web Design specific:
MVC (Model-View-Controller):
Complete separation of the;
model (database),
view (page view) and
controller (business logic).
Thursday, November 29, 2007
.NET Framework 3.5 Released!!
As most of the .NETers know, Microsoft .NET Framework 3.0 has been in the market for a while.
Along with that .NET Framework 3.5 was also available as a Beta version and as of 19th of November 2007, .NET Framework's 3.5 version has officially been released!
A new toy for us programmers to play around isn't it?! :)
So with this version it's been about two years know after .NET Framework 2.0' release in 2005.
Here are the direct links to download from Microsoft - for those who wanna skip to the download right away!
Download Microsoft .NET Framework 3.5
I'd suggest to download the express version of Visual Web Developer 2008 along with the new framework:
Download Visual Web Developer 2008 Express
Download Visual C# 2008 Express
Find the rest of the 2008 Express Series by clicking here.
I played around little bit with the VWD 2008 Express. Three things that came to my sudden interest:
Along with that .NET Framework 3.5 was also available as a Beta version and as of 19th of November 2007, .NET Framework's 3.5 version has officially been released!
A new toy for us programmers to play around isn't it?! :)
So with this version it's been about two years know after .NET Framework 2.0' release in 2005.
Here are the direct links to download from Microsoft - for those who wanna skip to the download right away!
Download Microsoft .NET Framework 3.5
I'd suggest to download the express version of Visual Web Developer 2008 along with the new framework:
Download Visual Web Developer 2008 Express
Download Visual C# 2008 Express
Find the rest of the 2008 Express Series by clicking here.
I played around little bit with the VWD 2008 Express. Three things that came to my sudden interest:
- Microsoft's recent popular keywords: Controls for AJAX, Silverlight & LINQ are available in the toolbox.
- CSS Properties & Manage Styles tabs saying "hello!" from the left border of the VWD.
- "Split" design mode in addition to 'HTML' and normal 'Design' mode. Was available in Frontpage. Good to see it now in VWD or Visual Studio let's say for those who are lucky to start developing in the 2008 version of Visual Studio! :)
Will keep sharing my experiences with .NET Framework 3.5 and Visual Web Developer!
Please gimme your comments on this and make me happy :)
Labels:
.NET,
2008,
3.5,
AJAX,
Download,
LINQ,
Silverlight,
Visual Studio
Tuesday, October 30, 2007
Assembly References
In this post I'd like to point out one important mistake I noticed that many beginners of .NET do: They forget to create a reference to related the .NET assembly.
Even if you are preparing for an interview question or doing the actual programming, you have to know you need to create an assembly reference in .net so that your compiler can compile the program.
An example to this mistake: The programmer includes the below code to the top of the C# class file.
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
However, he/she forgets to tell the compiler where to find the actual assembly file (dll).
Correct the mistake by:
right click the solution, and click on "Add Reference".Select the System.Runtime.Remoting assembly in the list.This is like only telling someone to get sugar from Walmart.
How can that person know where Walmart is, if you don't tell him?!
Don't expect the person to guess or find out himself because the subject in question is NOT a person. He is a computer! And computers are stupid!
Even if you are preparing for an interview question or doing the actual programming, you have to know you need to create an assembly reference in .net so that your compiler can compile the program.
An example to this mistake: The programmer includes the below code to the top of the C# class file.
using System.Runtime.Remoting;
using System.Runtime.Remoting.Channels;
using System.Runtime.Remoting.Channels.Tcp;
However, he/she forgets to tell the compiler where to find the actual assembly file (dll).
Correct the mistake by:
right click the solution, and click on "Add Reference".Select the System.Runtime.Remoting assembly in the list.This is like only telling someone to get sugar from Walmart.
How can that person know where Walmart is, if you don't tell him?!
Don't expect the person to guess or find out himself because the subject in question is NOT a person. He is a computer! And computers are stupid!
Subscribe to:
Posts (Atom)