OOP in CSharp Part2

Post on 13-Mar-2016

241 views 6 download

Tags:

description

OOP in CSharp Part2

Transcript of OOP in CSharp Part2

69

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

70

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

71

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

72

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

73

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

Note:

1. You cannot declare virtual methods as static

2. You cannot declare virtual methods as private

3. Virtual methods are supposed to be overriden by the new implementation of the same method in the child class

4. Base class method may be declared with ‘virtual’, but derived class may or may not override that base class method

5. If derived class wants to override the base class method, then use the override keyword while providing new implementation of the same method in the child class

74

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

75

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

76

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

77

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

78

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

79

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

80

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

81

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

82

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

83

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

84

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

85

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

86

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

87

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

88

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

89

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

90

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

91

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

92

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

93

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

94

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

95

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

Note: If you implement a member of an interface in a class implicitly, you can call that member implicitly or explicitly, i.e., using nay of the ways.

96

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

97

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

98

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

99

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

100

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

101

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

102

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

103

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

104

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

105

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

106

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

107

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

108

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

109

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

110

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

111

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

Note:

* -- You can declare many overloaded constructors, but all of them have to assign value to fields. So, practically, only one overloaded constructor is enough to do the job.

112

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

113

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

114

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

115

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

116

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

117

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

118

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

119

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

120

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

121

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

122

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

123

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

124

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

125

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

126

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

127

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

128

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

129

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

130

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

131

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

132

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

133

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

134

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

135

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s

136

PDFi

ll PD

F Ed

itor w

ith F

ree W

riter

and

Tool

s