This website is dedicated to common, day to day programming and database related Frequently Asked Questions. Popular Programming and Database Articles under one blog
Tuesday, April 14, 2009
What is Silverlight ?
It is combination of different technolgoies into a single development platform that allows you to select tools and the programming language you want to use. Silverlight integrates seamlessly with your existing Javascript and ASP.NET AJAX code to complement functionality which you have already created.
Silverlight aims to compete with Adobe Flash and the presentation components of Ajax. It also competes with Sun Microsystems’ JavaFX, which was launched a few days after Silverlight.
Currently there are 2 major versions of Silverlight:
Silverlight 1.0 and Silverlight 2.0( previously referred to as version 1.1).
What is static class?
A class can be declared static (in c#) , indicating that it contains only static members. It is not possible to create instances of a static class using the new keyword. Static classes are loaded automatically by the .NET Framework common language runtime (CLR) when the program or namespace containing the class is loaded.
Use a static class to contain methods that are not associated with a particular object. For example, it is a common requirement to create a set of methods that do not act on instance data and are not associated to a specific object in your code. You could use a static class to hold those methods.
The main features of a static class are:
-
They only contain static members.
-
They cannot be instantiated.
-
They are sealed.
-
They cannot contain Instance Constructors (C# Programming Guide).
Creating a static class is therefore much the same as creating a class that contains only static members and a private constructor. A private constructor prevents the class from being instantiated.
The advantage of using a static class is that the compiler can check to make sure that no instance members are accidentally added. The compiler will guarantee that instances of this class cannot be created.
Static classes are sealed and therefore cannot be inherited. Static classes cannot contain a constructor, although it is still possible to declare a static constructor to assign initial values or set up some static state.Reference: http://msdn.microsoft.com/en-us/library/79b3xss3(VS.80).aspx
What is partial class?
One of the greatest benefits of partial classes is that it allows a clean separation of business logic and the user interface (in particular the code that is generated by the visual designer). Using partial classes, the UI code can be hidden from the developer, who usually has no need to access it anyway. Partial classes will also make debugging easier, as the code is partitioned into separate files.
referenced: http://www.devx.com/dotnet/Article/22603
Thursday, January 1, 2009
Tuesday, December 2, 2008
Executing a SQL script using ADO.NET
http://www.mattberther.com/2005/04/11/executing-a-sql-script-using-adonet/