There are different types of attack exists in web programming like SQL Injection Attack, Cross Site Scripting Attack(XSS), Open Redirection Attack etc. and we need to take care of these attacks when writing code and try to prevent our application from these attack.
This article will demonstrate us how we can get/read the configuration setting from Web.Config or App.Config in C#. There are different purposes to set the values inside the configuration file and read their values based on defined keys, we define those values inside the configuration section which might be need to make it more secure, it could be some secret keys or the value which should get frequently.
This article will demonstrate you about all interview questions related to delegate with practical implementation.
As you know Microsoft has launched Visual Studio 2015 with .Net 4.6. C# 6.0 has introduced with .Net 4.6 and there are lots of new features to add csharp 6.0 like Auto property and many more. Expression bodied member are one of them. You can make code more clean and readable to use this. So, this post is basically for the new feature of C# 6.0 Expression bodied members.
As we know C# 6.0 introduced with Visual Studio 2015. There are several features introduced in several version of the C# like LINQ was introduced with C# 3.0, Dynamic feature was introduced with C# 4.0, Async and Await were introduced with C# 5.0 etc.
In C# 6.0, most focus on syntactical improvement rather than new feature to add on. These features will help us to write code faster and simple way.
Delegate is as like as function pointer in C# but delegates are type safe. Delegate is an object that point to another method and method can be static or instance. It take arguments and return value. It takes reference to other methods. We can invoke or call the method through the delegate object. If you have got a chance to work with C++ or you will from C++ background then you definitely know about function pointer in C++.
Web Service is an application or we can say a standard way for interacting directly with other application over the internet. It’s a way to develop interoperable application over the internet. Web Service can locate on same computer within same network or different computer with different network. Web service is protocol independent, language independent and platform independent. Web services support standard protocol and data format like HTTP, XML, and SOAP.
Today, I am going to explain, what is the difference between an Abstract class and An Interface and when should we use it? It is very typical interview question. There are lots of differences and similarities in an abstract class and an interface. So, I am trying to explain both with example.
Abstract classes contain complete (Concrete) and abstract (Incomplete) both type of members. An abstract class is closely related to interface. We cannot create object of an abstract class but can inherit from child class. Abstract keyword is used to create an abstract class.
Today, I am going to explain C# coding standards naming conventions for best practice when you are developing a application.
Camel Case (camelCase) : In this the first letter of word always in small letter and after that each word with Capital letter.
Pascal Case (PascalCase): In this First letter of every word is in capital letter.
Underscore Prefix (_underScore) : For underscore ( __ ), the word after _ use camelCase terminology.
Microsoft has launched Visual Studio 2015 preview version with .Net 4.6. If you haven’t downloaded it, download Visual Studio 2015 and .Net 4.6. Visual Studio 2015 has come with C# 6.0 with lots of new features which improve your coding style and standard. So, today I am going to explain one of the feature of C# 6.0, how to set default values to auto property.