This is very commonly asked c# interview question. This question is basically asked to check, if you are passionate about catching up with latest technological advancements. The list below shows a few of the new features introduced in c# 4.0. If you are aware of any other new features, please submit those using the from at the end of this post.
1. Optional and Named Parameters
2. COM Interoperability Enhancements
3. Covariance and Contravariance
4. Dynamic Type Introduction
Monday, April 8, 2019
What's the difference between IEnumerable and List ?
1. IEnumerable is an interface, where as List is one specific implementation of IEnumerable. List is a class.
2. FOR-EACH loop is the only possible way to iterate through a collection of IEnumerable, where as List can be iterated using several ways. List can also be indexed by an int index, element can be added to and removed from and have items inserted at a particular index.
3. IEnumerable doesn't allow random access, where as List does allow random access using integral index.
4. In general from a performance standpoint, iterating thru IEnumerable is much faster than iterating thru a List.
2. FOR-EACH loop is the only possible way to iterate through a collection of IEnumerable, where as List can be iterated using several ways. List can also be indexed by an int index, element can be added to and removed from and have items inserted at a particular index.
3. IEnumerable doesn't allow random access, where as List does allow random access using integral index.
4. In general from a performance standpoint, iterating thru IEnumerable is much faster than iterating thru a List.
Difference between AS and IS in C# ?
The Difference between IS and As is that..
IS - Is Operator is used to Check the Compatibility of an Object with a given Type and it returns the result as a Boolean (True Or False).
AS - As Operator is used for Casting of Object to a given Type or a Class.
Ex. Student s = obj as Student;
is equivalent to:
Student s = obj is Student ? (Student)obj : (Student)null;
Both 'is' and 'as' keywords are used for type casting in C#.
IS Operator
Is Operator is used to Check the Compatibility of an Object with a given Type and it returns the result as a Boolean i.e. True Or False.
if(obj is string)
{
...
}
In the above code the keyword checks whether the value on its left side is an instance of the type on the right side.
AS Operator
As Operator is used for Casting of Object to a given Type or a Class. The as keyword is used to cast nullable types if the specified value is not an instance of the specified type.
MyClass myObject = obj as MyClass;
Difference between call by ref and call by out ?
1) Call by ref should be assigned before using where as Call by Out not required to assign a value.
Key Differences Between Ref and Out in C#
- When a variable preceded by the ref keyword is passed to any method then the changes made to it inside the method reflects in its original value. When a variable passed to a method is preceded by out keyword the method returns it without using return keyword.
- The ref parameter should be initialized before it is passed to a method. On the other hand, the out parameter must be initialized inside the method it is passed to.
- While calling, declaring, or defining a method, ref parameter is explicitly declared as ref. On the other hand, while calling, declaring, or defining a method, out parameter is explicitly declared as out.
Wednesday, August 29, 2018
SQL Server Versions..
| RTM (no SP) | SP1 | SP2 | SP3 | SP4 | |
|---|---|---|---|---|---|
codename vNext | 14.0.1000.169 *new | ||||
| 13.0.1601.5 | 13.0.4001.0 or 13.1.4001.0 | 13.0.5026.0 or 13.2.5026.0 | |||
| 12.0.2000.8 | 12.0.4100.1 or 12.1.4100.1 | 12.0.5000.0 or 12.2.5000.0 | |||
codename Denali | 11.0.2100.60 | 11.0.3000.0 or 11.1.3000.0 | 11.0.5058.0 or 11.2.5058.0 | 11.0.6020.0 or 11.3.6020.0 | 11.0.7001.0 or 11.4.7001.0 |
codename Kilimanjaro | 10.50.1600.1 | 10.50.2500.0 or 10.51.2500.0 | 10.50.4000.0 or 10.52.4000.0 | 10.50.6000.34 or 10.53.6000.34 | |
codename Katmai | 10.0.1600.22 | 10.0.2531.0 or 10.1.2531.0 | 10.0.4000.0 or 10.2.4000.0 | 10.0.5500.0 or 10.3.5500.0 | 10.0.6000.29 or 10.4.6000.29 |
codename Yukon | 9.0.1399.06 | 9.0.2047 | 9.0.3042 | 9.0.4035 | 9.0.5000 |
codename Shiloh | 8.0.194 | 8.0.384 | 8.0.532 | 8.0.760 | 8.0.2039 |
codename Sphinx | 7.0.623 | 7.0.699 | 7.0.842 | 7.0.961 | 7.0.1063 |
Monday, August 27, 2018
Azure Interview Questions
1) What are the different types of services offered in the cloud?
| IAAS | PAAS | SAAS |
| In infrastructure as a service, you get the raw hardware from your cloud provider as a service i.e you get a server which you can configure with your own will. | Platform as a Service, gives you a platform to publish without giving the access to the underlying software or OS. | You get software as a service in Azure, i.e no infrastructure, no platform, simple software that you can use without purchasing it. |
| For Example: Azure VM, Amazon EC2. | For example: Web Apps, Mobile Apps in Azure. | For example: when you launch a VM on Azure, you are not buying the OS, you are basically renting it for the time you will be running that instance. |
2. What is cloud computing?
Answer: It is the use of servers on the internet to “store”, “manage” and “process” data. The difference is, instead of using your own servers, you are using someone else’s servers to do your task, paying them for the amount of time you use it for.
3. What are the different cloud deployment models?
Answer: Following are the three cloud deployment models:
Public Cloud: The infrastructure is owned by your cloud provider and the server that you are using could be a multi-tenant system.
Private Cloud: The infrastructure is owned by you or your cloud provider gives you that service exclusively. For eg: Hosting your website on your servers, or hosting your website with the cloud provider on a dedicated server.
Hybrid Cloud: When you use both Public Cloud, Private Cloud together, it is called Hybrid Cloud. For Example: Using your in-house servers for confidential data, and the public cloud for hosting your company’s public facing website. This type of setup would be a hybrid cloud.
4. I have some private servers on my premises, also I have distributed some of my workload on the public cloud, what is this architecture called?
- Virtual Private Network
- Private Cloud
- Virtual Private Cloud
- Hybrid Cloud
Answer: D. Hybrid Cloud
Answer: This type of architecture would be a hybrid cloud. Why? Because we are using both, the public cloud, and on premises servers i.e the private cloud. To make this hybrid architecture easy to use, wouldn’t it be better if your private and public cloud were all on the same network (virtually). This is established by including your public cloud servers in a virtual private cloud, and connecting virtual cloud with your on premise servers using a VPN (Virtual Private Network).
Answer: This type of architecture would be a hybrid cloud. Why? Because we are using both, the public cloud, and on premises servers i.e the private cloud. To make this hybrid architecture easy to use, wouldn’t it be better if your private and public cloud were all on the same network (virtually). This is established by including your public cloud servers in a virtual private cloud, and connecting virtual cloud with your on premise servers using a VPN (Virtual Private Network).
Apart from this Azure Interview Questions Blog, if you want to get trained from professionals on this technology, you can opt for a structured training from edureka! Click below to know more.
5. What is Microsoft Azure and why is it used?
Answer: As discussed above, the companies which provide the cloud service are called the Cloud Providers. There are a lot of cloud providers out there, out of them one is Microsoft Azure. It is used for accessing Microsoft’s infrastructure for cloud.
6. Which service in Azure is used to manage resources in Azure?
- Application Insights
- Azure Resource Manager
- Azure Portal
- Log Analytics
Answer: B Azure Resource Manager
Explanation: Azure Resource Manager is used to “manage” infrastructures which involve a no. of azure services. It can be used to deploy, manage and delete all the resources together using a simple JSON script.
7. Which of the following web applications can be deployed with Azure?
- ASP.NET
- PHP
- WCF
- All of the mentioned
Windows 10 Pro shortcuts....
- Press "Windows" + "X".
- Select "Programs and Features", Event Viewers, Device Manager, Network Connections etc...
- Here you can see the installed programs.
Subscribe to:
Posts (Atom)