Sunday, 31 July 2016

Abstraction and Encapsulation ( Chapter-4)




Abstraction and Encapsulation

1)  Abstraction and encapsulation are important features of any object-oriented programming language.
2)  Abstraction involves extracting only the relevant information.
                    a)  Encapsulation involves packaging one or more components together


Looping in C# (Chapter 3)




Conditional Constructs
1.          If –else / Switch case
2.          Iterative Looping



Conditional Constructs


1.          Conditional constructs allow the selective execution of statements, depending on the value of expression associated with them.
2.          The if…else conditional construct is followed by a logical expression where data is compared and a decision is made on the basis of the result of the comparison.
3.          The following is the syntax of the if…else construct:


Saturday, 30 July 2016

Operators In C# (Chapter-2)



Operators:- To do manipulation on operands(also known as variables) we use operators in C# .

Types of Operators:-
  
     Ø  Arithmetic operators 
     Ø  Arithmetic Assignment operators
     Ø  Unary operators
     Ø  Comparison operators
     Ø  Logical operators

Arithmetic Operators

Ø  Arithmetic operators are the symbols that are used to perform arithmetic operations on variables.

Operator
Description
Example
+
Used to add two numbers
X=Y+Z;
If Y is equal to 20 and Z is equal to 2, X will have the value 22.
-
Used to subtract two numbers
X=Y-Z;
If Y is equal to 20 and Z is equal to 2, X will have the value 18.
*
Used to multiply two numbers
X=Y*Z;
If Y is equal to 20 and Z is equal to 2, X will have the value 40.
/
Used to divide one number by another
X=Y/Z;
If Y is equal to 21 and Z is equal to 2, X will have the value 10.
But, if Y is equal to 21.0 and Z is equal to 2, X will have the value 10.5.
%
Used to divide two numbers and return the remainder
X=Y%Z;
If Y is equal to 21 and Z is equal to 2, X will contain the value 1.

Arithmetic Assignment Operators
Arithmetic assignment operators are used to perform arithmetic operations to assign a value to an operand

Operator
Usage
Description
=
X = 5;
Stores the value 5 in the variable X.
+=
X+=Y;
Same as:
X = X + Y;
-=
X-=Y;
Same as:
X = X - Y;
*=
X*=Y;
Same as:
X = X * Y;
/=
X/=Y;
Same as:
X = X / Y;
%=
X%=Y;
Same as:
X = X % Y;

Unary Operators
Ø  Unary operators are used to increment or decrement the value of an operand by 1.
Ø  The following table explains the usage of the increment and decrement operators.
Operator
Usage
Description
Example
++
++Operand;
(Preincrement operator)
Or,
Operand++; (Postincrement operator)
Used to increment the value of an operand by 1
Y = ++X;
If the initial value of X is 5, after the execution of the preceding statement, values of both X and Y will be 6.
Y = X++;
If the initial value of X is 5, after the execution of the preceding statement, value of X will be 6 and the value of Y will be 5.
--
--Operand;
(Predecrement operator)
Or,
Operand--; (Postdecrement)
Used to decrement the value of an operand by 1
Y = --X;
If the initial value of X is 5, after the execution of the preceding statement, values of X and Y will be 4.
Y = X--;
If the initial value of X is 5, after the execution of the preceding statement, value of X will be 4 and the value of Y will be 5.

Comparison Operators
Ø  Comparison operators are used to compare two values and perform an action on the basis of the result of that comparison.
Ø  The following table explains the usage of commonly used comparison operators.
­­­
Usage
Description
Example
(In the following examples, the value of X is assumed to be 20 and the value of Y is assumed to be 25)
< 
expression1 < expression2
Used to check whether expression1 is less than expression2
bool Result;
Result = X < Y;
Result will have the value true.
> 
expression1 > expression2
Used to check whether expression1 is greater than expression2
bool Result;
Result = X > Y;
Result will have the value false.
<=
expression1 <= expression2
Used to check whether expression1 is less than or equal to expression2
bool Result;
Result = X <= Y;
Result will have the value true.
>=
expression1 >= expression2
Used to check whether expression1 is greater than or equal to expression2
bool Result;
Result = X >= Y;
Result will have the value false.
==
expression1 == expression2
Used to check whether expression1 is equal to expression2
bool Result;
Result = X == Y;
Result will have the value false.
!=
expression1 != expression2
Used to check whether expression1 is not equal to expression2
bool Result;
Result = X != Y;
Result will have the value true.
||
expression1 || expression2
Returns true if either expression1 or expression2 or both of them are true.
bool Result
string str1, str2;
str1 = “Korea”;
str2 = “England”;
Result= ((str1==“Korea”) || (str2== “France”))
Console.WriteLine (Result .ToString());
The message displays True  if either str1 has the  value “Korea” or str2 has the value “France”.
^
expression1 ^ expression2
Returns true if either expression1 or expression2 is true. It returns false if both expression1 and expression2 are true or if  both expression1 and expression2 are false.
bool Result;
string str1, str2;
str1 = “Korea”;
str2= “France”;
Result = (str1== “Korea”) ^ (str2== “France”);
Console.WriteLine (Result .ToString());
The message False is displayed because both the expressions are true.

Next Click here for Chapter -3 

Kindly click on Follow me   for more updates

Kindly share this link to your friends on Facebook,Whats up,Twitter,Google+ .






Basic of C# (Chapter-1)




C# Creation
In 1990s , Microsoft developed C# overall .NET strategy. First alpha versions is created in 2000 developed by Anders Hejlesberg. C# is directly related to C,C++ and Java.         C# is improve version of C++. C is grandfather of C# ,its syntax derived from C.
C# is designed to produce portable code. C# is a component oriented language because if contains integral support for the writing of software components.

C# (C-Sharp) is an object-oriented programming language developed by Microsoft that intends to be a simple, modern, and general-purpose programming language for application development.




Relational Database Management System (Part-3)



Conceptual Model




Ø Reflects entities and their relationships, based on the data processing needs of an organisation
Ø Is independent of individual applications, database management systems, hardware, and physical storage of data


Relational Model in RDBMS (Part-2)






Ø  Relational model is an attempt to simplify the database structure.
Ø  It represents all data in the database as simple tables in the row-column format.
Ø  RDBMS can be defined as a DBMS where all data visible to the user is organised strictly as tables of data values and where all database operations work on these tables.



Relational Database Management System (Part-1)



Databases are an integral part of an organisation. To make a good application we should design and implement the database correctly


Database Management Systems

v  A database is a collection of logically related information.
v  Database Management is the task of maintaining databases so that information is readily available.
v  The software required to perform the task of database management is called a Database Management System (DBMS).


Thursday, 28 July 2016

How to Find Memory Leaks With CLRProfiler




We all knows that Memory leaks but don't know How to Protect it or Find the memory leakage in our program. Here I am giving you a way to protect the Memory Leaks in .Net. Microsoft has provide us a Tool known as CLR Profiler is an open source tool for analysing the behaviour of your managed application, Download here.



Re-Use Waste from Reverse Osmosis (RO)



Technology harming Nature        
Pure water is not produced without a cost, no matter what the technology.  
Whenever we are using R0 approx. 75% of the Water fed into a RO filter is wasted. We only 25% gets extracted as drinking Water.
Due to this we waste a huge amount of the Water Supply into Sewage. As we all know our environment is facing a problem of Global warming and soon Ground Level water will be existed.
I am sharing a quick way how to perverse the water and use it for the household activities. I am doing it from past 1 Year.
I give a simple example For every 1 litre safe filtered drinking water in the RO tank 3 litres goes rejected as hard water. But we can use that rejected water for washing clothes, kitchen utensils cleaning, floor moping, car washing etc.


Tuesday, 26 July 2016

Open (Show) Javacript UI Dialog Modal Popup on Button Click



 Introduction: In order to show  Dialog Modal Popup box from automatically opening on Page Load.

Example
private void showPopHotSellingCourses()
    {
 
                ScriptManager.RegisterStartupScript(this, GetType(), "", "showmodalpopup();", true);
         
    }

 <script type="text/javascript">
         function showmodalpopup() {
            // alert("hi");
             $('#crosspop').click(function () {
                 $('.plat-overlay').fadeOut('fast');
       
             });
             setTimeout(function () {
                 $('.plat-overlay').fadeIn('fast');
             }, 3000);

             setTimeout(function () {
                 $('.plat-overlay').fadeOut('fast');
             }, 12000);
         }
</script>


Top 9 ways to promote your blog on Google+




Google + is upcoming social networking site after facebook. It is prefect place where you can meet people and share your views.


Following are 10 tips to help traffic on your blog with the help of Google+ :-
1.  Be Active
Regular update your Google+ Profile. Keeping reading the Reviews of the reader and updating your blog. Make sure you spend time commenting on other members' updates as well.


Asp.Net Interview Questions for Fresher’s




    Basic Asp.Net Interview Questions for Fresher’s





1.     What is ASP.Net?
It is framework which is developed By Microsoft to develop web sites using web forms(aspx), MVC,   HTML, Javascript, CSS etc.Asp.Net compiles the Web pages and provides much better performance than scripting languages, such as VBScript. We can create the Web Application with most commonly used languages like visual basic , C#,J#.



Monday, 25 July 2016

Basic Intervew Queston in C# (Part 4)



C# Interview Question:-


21) Define Property in C# ?
Property Place is important role when private variable cannot access outside the class but with the help of property we can do this.



Basic Interview Questions in C# (Part-3)



C# Interview Questions



13) Can we execute multiple catch blocks in C#?
We can use multiple catch block with single try block but multiple catch block don’t execute Once the exception occurred it will caught by specific catch block then comes out.



Basics Interview Question in C# (Part 2)



C# Interview Question



7) What is the difference between arrays and collection?
Array:
  1. Size of an Array is static . It cannot resized at runtime.
  2. Value of the Array should be same as data type of the array.
Collection:
  1. Size of collection can be changed dynamically. It does not have fixed size.
  2. Collection can have elements of different types.
8) Explain sealed class in C#?

Sealed class is class which cannot be inherited from other classes. 

9) Explain sealed modifier in C#?
“Sealed” method are those methods which cannot override in the child classes.

10) Explain Static keyword in C#?
“Static” keyword can be declared in static member. If you declared class as static then all the members of the class are made static. Only one copy of static exists.
11) How the exception handling is done in C#?
We can do it with the help of “try… catch” block to handle the error/exception.
12)  What is object-oriented programming (OOP)?

OOP consists classes that contain properties, methods, fields, and events. It is used to create Logically Module. We create object of class to access their variables ,property and Method in another class or method. So you can say that we are using encapsulation feature with the help of object that contains the features, such as data and behavior that are associated to a class

 .NET Framework supports only OOP languages, such as Visual Basic .NET, Visual C#, and Visual C++.