Blog

By Team Escalera on 14 Oct 2017 11:27 AM
  • Strings
0 comments

Arrays of characters is a good example to explain Strings in C#.  But actually Strings are Objects in C#.
While declaring a string variable, an object of type “String”  is  instantiated.
Various useful properties and methods are supported by String objects.

Some examples are given below:
Length –  To get the length of a string.
Insert(index...............



By Team Escalera on 14 Oct 2017 11:29 AM
  • Encapsulation
0 comments

To understand what encapsulation means, it can be considered as “surrounding” an entity, to keep and protect whatever is inside the surrounding.

It has a similar concept in programming as well, here encapsulation has a wider meaning than combining the members together within a class; it has a function of access restriction to the inner workings of that class as well.
Access modifiers implements E...............



By Team Escalera on 14 Oct 2017 11:31 AM
  • Recursion
0 comments

A method that calls itself is called a recursive method.

Calculating the factorial of a number is One of the tasks that can be solved using recursion.
In Maths,  Factorial of a number x is denoted as x! and it is :
For example:5! = 5*4 * 3 * 2 * 1 = 120

It concludes that the factorial of any number can be calculated using number x number-1 and such that : number-1 reaches “...............



By Team Escalera on 31 Oct 2017 02:54 PM
  • Learn C#
0 comments

Many operators in C# can be overloaded, it means that they can be redefined for custom actions.
For example, you can redefine the action of the plus (+) operator in a custom class.
Consider the Box class that has Height and Width properties:

class Box {
public int Height {get; set;}
public int Width {get; set;}
public Bo...............



By Team Escalera on 31 Oct 2017 03:02 PM
  • asp.net training, C Sharp Training
0 comments

Let’s consider this example to understand the Usage of AND operator. AND operator is written as ‘&&’ two ampersands. It is used for getting results only if all the conditions are true , all the conditions are separated by && operator.

int age = 55;
double salary = 540;
if(age > 18 && salary > 100) {
Console.WriteLine(“Welcome User”);
}

Here we declared age as 55 and ...............



By Team Escalera on 31 Oct 2017 03:09 PM
  • Protected Access Modifier
0 comments

A Protected Access modifier is almost like the Private Access Modifier but with
a difference that Protected access modifier can be accessed only from a derived class.

class Human{
protected int Age {get; set;}
protected string Name {get; set;}
}
class Employee: Human{
public Employe(string nm) {
Name = nm;
}
public void Speak() {
Console.Write(“N...............



By Team Escalera on 31 Oct 2017 03:13 PM
  • asp .net training in lucknow, C# basic concepts, learn c#
0 comments

This is a sample program in C#(sharp) :

The get and set accessors can be used for  defining an indexer.

using System;

using System.Collections.Generic;

using System.Linq;

using System.Text;

using System.Threading.Tasks;

 

namespace EscaleraT

{

class Program

{

class Clients {

private string[] names = new string[10];

<...............



By Team Escalera on 31 Oct 2017 03:15 PM
  • learn C#
0 comments

Lets Create a String and name it ‘x’

string x = “good text”;
Console.WriteLine(x.Length);

// x.Length will return the length of String, it will count spaces  as well.
//Outputs 9

Console.WriteLine(a.IndexOf(‘t’));

//It will return the position of ‘t’
//Outputs 5

x= x.Insert(0, “This is “);
Console.WriteLine(x)...............



By Team Escalera on 31 Oct 2017 03:17 PM
  • asp .net training in lucknow
0 comments

Inheritance

It can be defined as an “Is – A” relationship.

A Class has Parameters and Methods. There can be another class with same parameters as the Main class.

In this case the Main Class is known as Base Class and the Other Class is known as derived class as it will “Inherit” the methods and parameters from the Base Class.

Let Shape is a Class and Base, Radius,&n...............



By Team Escalera on 31 Oct 2017 03:19 PM
  • asp.net training
0 comments

Text to md5 in C Sharp Password Encryption

To Convert a value from TextBox in Asp.net using C# into md5 hash

use following assembly reference in your page
using System.Security.Cryptography; \\FOR MD5

using System.Text;\\For ASCII encoding

And code :

public string GetMD5(string text)

        {

  ...............



By Team Escalera on 31 Oct 2017 03:20 PM
  • learn C#
0 comments

It is sometimes needed to generate random integers in C# programming.

Random integers can be used  for human verification in Math Captcha .

Random integers can be used for sms verification etc.

Let’s see how to do it.

Our Aspx Code

<asp:Content ID=”Content2″ ContentPlaceHolderID=”MainContent” Runat=”Server”>

    <asp:Label ID=”lblR...............



By Team Escalera on 31 Oct 2017 03:24 PM
  • learn C#
0 comments

A Folder Named App_Code is created by Visual Studio in our Application by Default.

We have to create a Public Class in that folder.
And then write our function which we want to replicate in multiple pages.

Then :-
In the respective pages simply create the object of that public class, all the objects will be able to access
all the public functions of that class.

In the class (in App_code)

public class themainclass


By Team Escalera on 31 Oct 2017 03:25 PM
  • interview questions
0 comments

What are destructors in C #

In C # Class is instantiated when Constructors are used but when an Object of a Class is deleted Class Destructors are automatically invoked.

  • There can be only one destructor for a class.
  • A Destructor is not called / cannot be called, it is invoked automatically.
  • A Destructor cannot be modified using modifiers
  • A Destructor cannot have parameters

A Destructor Shares same name with ...............



By Team Escalera on 19 Dec 2017 01:06 PM
  • Type of Loop in C#
0 comments

1. while loop

It repeats a statement or a group of statements while a given condition is true. It tests the condition before executing the loop body.

Syntax:    while(condition) { statement(s); }

2. for loop

It executes a sequen...............



By Team Escalera on 30 Jun 2018 12:14 PM
  • Test
0 comments

Test

...............