Wednesday, June 10, 2009

Is it possible to create a shared event in .NET?

Que. Is it possible to create a shared event in .NET?
Ans. Yes, but shared events may only be raised by shared methods.

Is it possible to specify an access specifier to an event in .NET?

Que. Is it possible to specify an access specifier to an event in .NET?
Ans. Yes, though they are public by default.

What is the return type of an event in .NET?

Que. What is the return type of an event in .NET?
Ans. There is No return type of an event in .NET.

Is a delegate a type-safe functions pointer?

Que. Is a delegate a type-safe functions pointer?
Ans. Yes

What is the difference between a session object and an application object?

Que. What is the difference between a session object and an application object?
Ans. A session object can persist information between HTTP requests for a particular user, whereas an application object can be used globally for all the users.

Which control has a faster performance, Repeater or Datalist?

Que. Which control has a faster performance, Repeater or Datalist?
Ans. Repeater.

Which control has a faster performance, Datagrid or Datalist?

Que. Which control has a faster performance, Datagrid or Datalist?
Ans. Datalist.

Is it possible to perform forms authentication with cookies disabled on a browser?

Que. Is it possible to perform forms authentication with cookies disabled on a browser?
Ans. Yes, it is possible.

What are the steps to use a checkbox in a gridview?

Que. What are the steps to use a checkbox in a gridview?
Ans.
OnCheckedChanged="Check_Clicked">

How do we enable tracing in .NET applications?

Que. How do we enable tracing in .NET applications?
Ans. <%@ Page Trace="true" %>

Is it possible to disable client side script in validators?

Que. Is it possible to disable client side script in validators?
Ans. Yes. simply EnableClientScript = false.

How to we add customized columns in a Gridview in ASP.NET?

Que. How to we add customized columns in a Gridview in ASP.NET?
Ans. Make use of the TemplateField column.

Is it possible to stop the clientside validation of an entire page?

Que. Is it possible to stop the clientside validation of an entire page?
Ans. Set Page.Validate = false;

Why we use Autogenerated columns?

Que. What property within the asp:gridview control is changed to bind columns manually?
Ans. Autogenerated columns is set to false

What method is used to explicitly kill a user's session?

Que. What method is used to explicitly kill a user's session?
Ans. Session.Abandon()

Is XML a case-sensitive markup language?

Que. Is XML a case-sensitive markup language?
Ans. Yes.

What is the base class of all web forms?

Dev Palmistry

Que. What is the base class of all web forms?
Ans. System.Web.UI.Page

What is managed data?

Que. What is managed data?
Ans. The data for which the memory management is taken care by .Net runtime’s garbage collector, and this includes tasks for allocation de-allocation.

What are the new features in .NET 2.0?

Que. What are the new features in .NET 2.0?
Ans. Plenty of new controls,
Generics,
anonymous methods,
partial classes,
iterators,
property visibility (separate visibility for get and set) and static classes.

Can we run ASP.NET 1.1 application and ASP.NET 2.0 application on the same computer?

Que. Can we run ASP.NET 1.1 application and ASP.NET 2.0 application on the same computer?
Ans. Yes, though changes in the IIS in the properties for the site have to be made during deployment of each.

Is String a Reference Type or Value Type in .NET?

Que. Is String a Reference Type or Value Type in .NET?
Ans. String is a Reference Type object.

Are MSIL and CIL the same thing?

Dev Palmistry

Que. Are MSIL and CIL the same thing?
Ans. Yes, CIL is the new name for MSIL.

How to Describe Project !!

PROJECT SUMMARY

1. IDLDPL (Indian Digital Life Style Distributors Pvt. Ltd.)
(Current Running Project)

Employer: Arete Consultants pvt ltd.

Profile: Software Developer

Duration: Sep ’08 to till date

Responsibilities: Involved in coding, Writing Stored Procedures, Views, Database Developing.

My Modules: Master, Stock Transfer, Stock Return and Other. And Whole User Part.

Environment: Windows XP SP2, Visual Studio 2005 Dot Net Framework: 2.0

DataBase: Microsoft SQL Server 2000.

Team Members: 5
Role: Design and Coding with Database.

Tools: C#.NET, Java Script, Ajax.

Project Description:

IDLDPL systems are fully integrated solutions, developed on 3 tier architecture. They provide a backbone foundation system that provides most of the day-to-day business transactions. They are designed to deliver a seamless integration of information and knowledge. These systems are very powerful tools that can provide significant benefit to any distributed departments.
In addition, these fully integrated systems establish a foundation platform for delivering Web-based services and transactions, providing additional value to the organization and its customers.

IDLDPL contains the following modules:-?

Masters – First interface for add Employer, Customer, Supplier, Products etc as well as all the dropdown down values like Bank name, Brand Name etc.

Sale – Generate Order Form, Order Purchasing Form, and Invoice all with Edit, View Copy and Detail Facilities.

Purchase – Generate Purchase Order, Receive Invoice all with Edit, View Copy and Detail Facilities.

Stock Transfer – Generate Stock Transfer Request, Edit, And View Than Dispatch. As well as Received Request with Data Base Update.

Stock Return – Generate Stock Return to Supplier and From Customer with same Process as like Stock Transfer.

Payment – Used For All Payment Sent and Received Purpose.

Other – Containing the Other Forms like Job, News, and Products Offers etc…

Friday, May 29, 2009

Difference between Abstract Class and Interface ?

Dev Palmistry


Abstract Class:

# IS-A relationship.
# e.g. Student IS A Person, Employee IS A Person.
# cannot be instantiated.
# normally used for framework-type library classes: providing default behavior for some of its class members, but forcing the developer to implement

others.
# It has to be inherited for use .
# You need to INHERIT to use an abstract class.
# Attempting to instantiate an object of an abstract class retults in a compilation error
# Any Class with abstract method or property in it must be declared abstract
# Abstract will allow you to set the access specifier. Ex:- (private,public, protected, internal).
# Abstract will allow you to implement the body in abstract methods.
# Situation where functionality may add/remove "Abstract Class" is best solution.
# Eg. Creating Base Classes,Creating Base for your project where functionality may be added or remove or can be override if needed.Mostly common task are

move to base class and if required than can be overrided.


# in Abstract class you can Declare the Constructors,fields,methods,indexes,destructors etc

# practical example for abstract class:

we can use account class in bank as abstract class.inreality

there will be no account we can use .but only sbaccount and current account will be exist.so we can use account class as abstract

class and we can inherits this class in sbaccount class,current account class


# Example:
pulic Abstract Class A
{
public void Hi();

public void Hello()
{
Console.WriteLine("hello method");
}

}
public Class B
{
public overid void Hi()
{
Console.WriteLine("hi method");
}



2. Abstract Class: Allows common functionality to be shared across similar objects


Of course, don't use an abstract class in cases where functionality doesn't need to be shared.





Interface:

# CAN-DO relationship.
# e.g. Student CAN enrol, Student CAN submit assignment.
# cannot be instantiated.
# group of related methods with empty bodies .
# You need to IMPLEMENT to use an interface.

# The implementation of an interface is left completely to the developer.
# Interfaces can contain only the signature of a method but no body.
# Interfaces are used to declaring functionality.
# By default all interface methods are public.
# Situation where we have fix requirement "Interface" is best solution.
# Eg. Plugin .Where Pluging can be loaded dynamically and executes its functionality.
Thus that Plugin must follow or implement certain functionality.
# In class you can implement the interface method, but can’t implement the body in Interface method.
# in interface you can not Declare the Constructors,fields,methods,indexes,destructors
# Examples:'
//mutltiple inhiritance
Interface IA
{
void cat();
void Dog();
}
Interface IB
{
void door();
void tyres();
}
public class C:IA,IB
{
public void cat()
{
Console.WriteLine("hello cat method");
}
public void dog()
{
Console.WriteLine("hello dog method");
}
public void door()
{
Console.WriteLine("hello door method");
}
public void tyres()
{
Console.WriteLine("hello tyres method");
}
}



Exp : 1. Interfaces are useful when you do not want classes to inherit from unrelated classes just to get the required functionality. For example, let bird

be a class with a method fly(). It will be ridiculous for an aeroplane to inherit from bird class just because it has the fly() method. Rather the fly()

method should be defined as an interface and both bird and aeroplane should implement that interface.


Exp 2. Hi what suits my case !! Say a real estate builder is constructing an apartment with many flats.All the rooms in the flats have the same design,except

the bedroom. The bedroom design is left for the ppl who would own the flats i.e; the bedRooms can be of different designs for different flats.
I can achieve this through an abstract class like below:

public abstract class Flat
{
//some properties

public void livingRoom(){
//some code
}

public void kitchen(){
//some code
}

public abstract void bedRoom();

}

An implementation class would be as follows:


public class Flat101 extends Flat
{
public void bedRoom() {
System.out.println("This flat has a customized bedroom");
}

}



# Interface is without implementation, just interface or virtual methods.

# As per my understanding, it is can-do or is-do relationship. Like, from .NET framework, there are many interface like IComparer, ISortable etc. So, it is

something like, classes derived from the interface CAN-DO these things.


Defference :



# A class can inherit one or more interfaces, but only one abstract class.

# An abstract class can have abstract members as well non abstract members. But in an interface all the members are implicitly abstract and all the members

of the interface must override to its derived class.

# The members of the interface are public with no implementation. Abstract classes can have protected parts, static methods, etc.

# Interface are similar to abstraction classes.However , interfaces represent the higest level of abstraction in Object- oriented programming.This is because

all the methods in an interface are abstract and do not have implementation.In contrast ,the abstract classes might contain a method that has a body.

# 1).Interface have only signature. whereas Abstract class have signature and definition both r allow. 2). Interface have not allow modifier access. whereas

Abstract class are allowed modifier access. 3).Thurogh the Interface we can create the Multiple Inheritance whereas Abstract class are not allow the Multiple

Inheritance. 4).Interface is slower compare Abstract class.

# An abstract class may contain complete or incomplete methods. Interfaces can contain only the signature of a method but no body. Thus an abstract class can

implement methods but an interface can not implement methods. · An abstract class can contain fields, constructors, or destructors and implement properties.

An interface can not contain fields, constructors, or destructors and it has only the property's signature but no implementation. · An abstract class cannot

support multiple inheritance, but an interface can support multiple inheritance. Thus a class may inherit several interfaces but only one abstract class. · A

class implementing an interface has to implement all the methods of the interface, but the same is not required in the case of an abstract Class. · Various

access modifiers such as abstract, protected, internal, public, virtual, etc. are useful in abstract Classes but not in interfaces.

# Interface:- 1. Interfaces are used to declaring functionality. 2. By default all interface methods are public. 3. In class you can implement the interface

method, but can’t implement the body in Interface method. Abstract:- 1. Abstract will allow you to set the access specifier. Ex:- (private,public, protected,

internal). 2. Abstract will allow you to implement the body in abstract methods. 3. You can inherit the abstract methods in classes

# • Abstract Class
Cannot be instantiated.
Must be inherited and its methods should be overridden.
It have some concreate methods.
Access modifiers allowed.


• Interface
Have definition of a method not implementation. (implement through class)
Multiple inheritance possible through Interface only
Only Public Access modifier only allowed. Defaultly Public
No need of virtual overridden.
It’s used for to define a set of properties, methods and events.

# Following are the difference between abstract and interface,

1>Abstract class having method declaration as well as method method definition whereas interface having method declaration only.

2>Abstract class are known as partial abstract class whereas interface is known as fully abstract class.

3>Abstract class features we have to inherit to the child class whereas interface features we have to implement in the child classes.

4>Abstract class support access specifiers whereas interface doesn't support access specifiers.

5>Abstract class have normal variable as well as constant variable whereas interface have only constant variables.(Discuss it)

6>We can write constructor in abstract class whereas we can't write constructor in interface.

# Interfaces are similar to abstract classes.However,interface represent the highest level of abstraction in object-oriented programming.This is because all

the methods in an interface are abstract and do not have implementation.In contrast,the abstract classes that are created using Abstract keyword might

contain a method that has a body.

# Abstract Class vs. Interface
· An abstract class may contain complete or incomplete methods. Interfaces can contain only the signature of a method but no body. Thus an abstract

class can implement methods but an interface can not implement methods.

· An abstract class can contain fields, constructors, or destructors and implement properties. An interface can not contain fields, constructors, or

destructors and it has only the property's signature but no implementation.

· An abstract class cannot support multiple inheritance, but an interface can support multiple inheritance. Thus a class may inherit several

interfaces but only one abstract class.

· A class implementing an interface has to implement all the methods of the interface, but the same is not required in the case of an abstract Class.

· Various access modifiers such as abstract, protected, internal, public, virtual, etc. are useful in abstract Classes but not in interfaces.

· Abstract classes are faster than interfaces.

What is WSDL ?

Dev Palmistry

Que: What is WSDL ?
Answer: WSDL stands for Web Services Description Language, a standard by web services can tell clients what messages it accepts and which results it will return. It provides you information on the classes and methods that are supported by a particular web services.

What is UDDI ?

Que : What is UDDI ?
Ans: UDDI is Universal Description, Discovery and Integration Language. UDDI allow you to find web services by connecting to a directory. It is a directory that can be used to publish and discover public web services.

How to prevent a button from validation it’s form?

Que: How to prevent a button from validation it’s form?
Answer: Set the Causevalidation property of the button control to false . This is useful while user presses reset button.