Posts

What is AngularJS?

Image
AngularJS  is a structural  framework  for dynamic web apps. It lets you use HTML as your template language and lets you extend HTML's syntax to express your application's components clearly and succinctly.  AngularJS's  data binding and dependency injection eliminate much of the code you would otherwise have to write.

Static Classes and Static Class Members

A  static  class is basically the same as a non-static class, but there is one difference: a static class cannot be instantiated. In other words, you cannot use the  new  keyword to create a variable of the class type. Because there is no instance variable, you access the members of a static class by using the class name itself. For example, if you have a static class that is named  UtilityClass  that has a public method named  MethodA , you call the method as shown in the following example: UtilityClass.MethodA(); Static Members A non-static class can contain static methods, fields, properties, or events. The static member is callable on a class even when no instance of the class has been created. The static member is always accessed by the class name, not the instance name. Only one copy of a static member exists, regardless of how many instances of the class are created. Static methods and properties cannot access non-static fields and events...

C# Coding Standards and Naming Conventions

1. use PascalCasing for class names and method names. public Class TestClass {        public void TestMethod()       {            //--------------       } } 2 use camelCasing for method arguments and local variables. public Class TestClass {        public void TestMethod(UserDetail userDetail)       {            int usersCount=userDetail.items.count             //-----       } } 3. use PascalCasing for abbreviations 3 characters or more (2 chars are both uppercase)     HtmlHelper htmlHelper;     FtpTransfer ftpTransfer;     UIControl uiControl; Why: consistent with the Microsoft's .NET Framework. Caps would grap visually too much attention. 4. use...

Boxing and Unboxing

Boxing: Boxing is the process of converting a value type data type to the object or to any interface data type which is implemented by this value type. When the CLRlic boxes a value means when CLR is converting a value type to Object Type, it wraps the value inside a System.Object and stores it on the heap area in application domain. Example: public void fnBoxing() {        int i=5;        object o=i; //implicit Boxing } Unboxing: Unboxing is also a process which is used to extract the value type from the object or any implemented interface type. Boxing may be done implicitly, but unboxing have to be explicit by code. Example: public void fnUnboxing() {     object  o=5;    int i=(int)o;//explicit Unboxing  }

Difference between an abstract class and interfaces

Image
Difference between an abstract class and interfaces A class can implement any number of interfaces but a subclass can at most use only one abstract class. An abstract class can have non-abstract methods (concrete methods) whereas all methods of interfaces must be abstract. An abstract class can declare or use any variables whereas an interface is not allowed to do so. An abstract class can have a constructor declaration whereas an interface cannot. An abstract class is allowed to have all access modifiers for all of its member declarations whereas in an interface we cannot declare any access modifier (including public) since all the members of an interface are implicitly public.

c# - How to increase the max upload file size in ASP.NET?

If you are using IIS for hosting your application, then the default upload  size if 4MB. To increase it, please use this below section in your web.confg. <configuration> <system.web> <httpRuntime maxRequestLength = " 4096 " /> </system.web> </configuration> " 4096 " is in KB. For IIS7 and above, you also need to add the lines below: <system.webServer> <security> <requestFiltering> <requestLimits maxAllowedContentLength = "1073741824" /> </requestFiltering> </security> </system.webServer> Note:  maxAllowedContentLength  is measured in bytes while  maxRequestLength  is measured in kilobytes, which is why the values differ in this config example. (Both are equivalent to 1 GB.)

SQL Tips and Tricks: Indexing Dos and Don’ts

SQL Tips and Tricks: Indexing Dos and Don’ts : Indexing is such a large subject that getting a handle on what to do and what not to do when you're developing your indexing strategie...