Floating FB popout byF5debug

Interview Questions and Answers on .Net Framework, OOPS, ASP.Net, C#.Net, SQL Server, WCF Series – Part 15


Question 141 – What are Value Types?

  • Value types are types which hold both data and the memory on the same location.
  • When we assign the ‘int’ value to the other ‘int’ value it creates a complete different copy. These kinds of data types are called as ‘Value types’.
  • Value Types in .Net are
        • Double, Float, Integer types (sByte, byte, short, ushort, int, uint, long, ulong, char)
        • Decimal, Bool, Enumeration types


Question 142 – What are Reference Types?

  • Reference type has a pointer which points to the memory location.
  • When we create an object and when we assign one object to the other object, they both point to the same memory location. In other words if we change one of them the other object is also affected this is termed as ‘Reference types’.
  • Reference Types in .Net
        • String and Object


Question 143 – What are Boxing and UnBoxing means?

  • Move a value type to reference type -- stack to the heap – BOXING
  • Move reference type to a value type -- heap to the stack -- UNBOXING


Question 144 – What is Early Binding?

  • Early binding is nothing but declaring the Object of specific type. With this kind of object its cant be used to hold any other type of the Object/class.
  • Early bound just means the target method is found at compile time.
  • If the method doesn't exist the compiler will fail to compile the code.
  • Most script languages use late binding, and compiled languages use early binding.
  • The compiler guarantees that the function takes the right number of arguments, correct type and return value is of the correct type.


Question 145 – What is Late Binding?

  • Declaring an object of generic type and that object be used to hold the instance of the any object/Class.
  • Late bound means the target method is looked up at run time.
  • If the method isn't there, then program will crash or go to some exception handling scheme at run time.
  • Most script languages use late binding, and compiled languages use early binding.
  • The target function may not accept the arguments passed to it, and may have a return value of the wrong type.


Question 146 – What are the different WCF binding available?

  • BasicHttpBinding    Basic Web service communication. No security by default
  • WSHttpBinding    Web services with WS-* support. Supports transactions
  • WSDualHttpBinding    Web services with duplex contract and transaction support
  • WSFederationHttpBinding    Web services with federated security. Supports transactions
  • MsmqIntegrationBinding    Communication directly with MSMQ applications. Supports transactions
  • NetMsmqBinding    Communication between WCF apps by using queuing. Supports transactions
  • NetNamedPipeBinding    Communication between WCF apps on same computer. Supports duplex contracts and transactions
  • NetPeerTcpBinding    Communication between computers across peer-to-peer services. Supports duplex contracts
  • NetTcpBinding    Communication between WCF apps across computers. Supports duplex contracts and transactions


Question 147 – What is a BasicHttpBinding?

This binding is used when we need to use SOAP over HTTP.


Question 148 – What is a WSHttpBinding?

It is same like BasicHttpBinding. In short, it uses SOAP over HTTP. But with it also supports reliable message transfer, security and transaction.

Question 149 – What is a NetTcpBinding?

This binding sends binary-encoded SOAP, including support for reliable message transfer, security, and transactions, directly over TCP. The biggest disadvantage of NetTcpBinding is that both server and client should be also made in .NET language.


Question 150 – What is a WSDualHttpBinding?

  • The WSDualHttpBinding class is used to provide a secure and interoperable binding.
  • It is used with duplex service contracts to let both services and clients send/receive messages.
  • It assists Web Service protocols as does the WSHttpBinding class but for duplex contracts.
  • The WSDualHttpBinding class only supports SOAP security and requires reliable messaging.
        • Advantage: can get immediate response w/o waiting on polling timer
        • Disadvantage: less scalable than WsHttpBinding
        • Disadvantage: less firewall friendly
        • Disadvantage: slower than WSHttpBinding

 

Disclaimer – F5debug Interview Questions & Answers Series:

You may recopy extracts from these pages ("the material") to individual third party websites or to any intranet websites, but only if:
You acknowledge www.f5debug.net as the source of the material. Such acknowledgment should include reference to www.f5debug.net in the copy of the material and should also include “© Karthikeyan Anbarasan, www.f5debug.net ". You inform the third party that these conditions apply to him/her and that he/she must comply with them.

About Author: Karthikeyan Anbarasan, Microsoft MVP (Most Valuable Professional) in ASP.NET/IIS Architecture. He is the Founder and Chief Editor of the www.f5debug.net website and has authored books on Windows Phone and Business Intelligence(SSIS). He is also a Passionate Speaker and a Blogger on Microsoft Technologies.

You can Join Me On: Facebook, Twitter, Google Plus, LinkedIn

Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

Recent Posts

Random Posts

Most Viewed

URL Shortner

Create your own short urls!!!

Site Counter

free counters

Disclaimer

This is a personal weblog. The opinions expressed here represent my own and not those of my employer. For accuracy and official reference refer to MSDN/ TechNet. I have documented my personal experience on this blog.

Protected by Copyscape Web Plagiarism Finder

Site Meter