Thursday, March 22, 2018

Dictionary in C#

  • Dictionary is generic collection and includes System.Collections.Generic namespace.
  • This is collection of Key and value pair and key must be a unique.
  • In the dictionary, you cannot be including duplicate key. 
  • In the dictionary, duplicate key given run time error.

NOTE:

  1. It returns error if we try to find a key which does not exist.
  2.  It is faster than a hash table because there is no boxing and unboxing.
  3. Dictionary is a generic type which means we can use it with any data type.

List<T> in C#

List
  • Lists are strongly typed generic collections.
  • They will store values of different or same datatype.
  • List size will increase or decrease dynamically.
  •  Its defined in the System.Collections.Generic namespace
      Add item in List :

Saturday, August 5, 2017

What is AngularJS?

  • AngularJS is an open source JavaScript MVC framework for web applications.
  • AngularJS extends Html behavior by creating custom tags or adding attributes in tags.
  • AngularJS can be used to create Single Page Applications (SPA).
  Some of the reasons why I would prefer AngularJS:
  • You can create a template and reuse it in application multiple times.
  • You can bind data to any element in two ways, where two-way actually means changing data will automatically change element and changing element will change the data.
  • You can directly call the code-behind code in your html.You can validate forms and input fields before submitting it without writing a single line of code.
  • Allows you to control complete DOM structure show/hide, changing everything with AngularJS properties.
  • AngularJS allows you to write basic flow end-to-end testing, unit-testing, UI mocks.
AngularJS provides all the features you need to build a CRUD application like data-binding, data validation, url routing, reusable HTML components and most importantly dependency injection.

Saturday, September 17, 2016

What is Jquery

JQuery is a Javascript library which is used extensively for client side validation and manipulation of DOM elements. It is a light weight, cross browser compatible and is a repository of many reusable Javascript functions.
the features of jQuery
  • DOM element selections functions
  • DOM traversal and modification
  • Events
  • CSS manipulation
  • Effects and animations
  • Ajax
  • Extensibility
  • Utilities - such as browser version and the each function.
  • JavaScript Plugins 

Wednesday, August 3, 2016

What is MVC?

MVC is architecture pattern. It’s divided in main 3 sections:
  1. Model
  2. View
  3. Controller

      Model: The Model represents a set of classes that describe the business logic and provides the data to view.
View:  View is responsible for look and feel. It is only responsible for displaying the data that is received from the controller as the result.
Controller: controller is responsible for take the user request and process the user's data with the help of Model and passing the results back to the View.

What are Action methods in ASP.NET MVC?

All the public methods of a Controller class are called Action methods.
Action methods is responsible for accept the request from user and with the help of Model and passing the results back to the View. 
Action method with the following restrictions:
  1. Action method must be public. It cannot be private or protected
  2. Action method cannot be overloaded
  3. Action method cannot be a static method.



Action method are return ActionResult.
If you want to a public action methods  are not accessible from the URL. You decorate with NONACTION attribute.
E.g.

[NonAction]
public void AddressInfo(){
// some code inside here
}
[NonAction]
public ActionResult Address(){
// some code inside here
return View();
}

Hash Table in C#

 The Hashtable is a non-generic collection and used to store the key/value pairs based on the hash code of the key. Key will be used to acce...