Friday, July 18, 2008

OOPs with C# - Session 1

The concept of object orientted programming introduces a new concept which is known as class.

A class is a basic building block of object oriented programing.

Syntax:

class A
{

}

Regarding access modifier of class:
class access modifier = {public,protected,
private}
1. In most cases we mention public or protected to be the access modifier of a class. Very few case we can encounter where we mention private to be access modifier of a class.

Q. What happens if we declare a class private?






How Object Oriented Programming came into picture

1. Procedural programming: the program is written as a collection of actions (a procedure) that are carried out in sequence, one after the other. The order is important.
----- Structured programming can be seen as a subset or subdiscipline of procedural programming, one of the major programming paradigms.
----- At a low level, structured programs are often composed of simple, hierarchical program flow structures. These are regarded as single statements


______________Programming Paradigm
_______________________|
_______________________|___________________
___
|_______________________________________|
Unstructured Programing
________________ structured Programing
___________________________________________|
___________________________________________|_________________

____________________|________________________________________|
___________Procedural Programing ___________________ Object Oriented Programing



1. Unstructured Programing: Most simplest way of doing programing. Just sequence of instructions to be executed to achieve the task.Does not follow any structure(no program structure and no data structure). So there is no methods or procedure in this kind of programing.


2. Structured Programing: This solicites for a breaking the whole task into multiple subset of instruction. This subsets are methods or procedure.

Advantage over
Unstructured Programing:

1. Better Code maintanace
2. Better Reusability of code

3. Object Oriented Programing

Consider all real life entities as objects.
Introduces concepts of class.

Advantage over Unstructured Programing:

1. Better code reusuability
2. Better code maintanence
3. Data Encapsulation
4. Data hiding


Comparision:

Unstructured Programing

Structured Programing

Object Oriented Programing

code reusuability

less

medium

more

code maintanence

Most difficult

medium

Most easier

Data Encapsulation

No

No

Yes

Data hiding

No

No

Yes










Error: The following module was built either with optimization enabled or without debug information

Fix: Please do the following steps

1. From menu, select Tools then Options.



2. Once options is clicked following screen appears.



3. Select General under Debugging



4. Uncheck the checkbox beside Want if no user code on launch.



I am sure this will resolve the problem.
if its not working for you guys please pass your information here with this post I will try to see into that.