<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-5571184103023259871</id><updated>2012-02-18T23:06:39.643-08:00</updated><category term='Repeater'/><category term='pessimistic'/><category term='.Net 1.1'/><category term='collaboration'/><category term='Delay Signing'/><category term='HttpModules'/><category term='Function points'/><category term='SOAP. .Net Interview Question'/><category term='Httphandlers'/><category term='Unit'/><category term='truncate'/><category term='Testing'/><category term='Lambda expression'/><category term='VSTS'/><category term='Deleteable'/><category term='Essential Components'/><category term='Distributor'/><category term='Events'/><category term='Stateless'/><category term='Subscriber'/><category term='Threading'/><category term='Shadowing'/><category term='java'/><category term='CSS'/><category term='authentication'/><category term='GridView'/><category term='Cascading Style Sheets'/><category term='Silverlight Interview Questions'/><category term='Design'/><category term='.net interview questions'/><category term='WSS'/><category term='bindings'/><category term='Oop'/><category term='Updateable'/><category term='CAS'/><category term='Interfaces'/><category term='interview'/><category term='Array'/><category term='Methods'/><category term='Dataset'/><category term='Variable data'/><category term='Polymorphism'/><category term='tostring'/><category term='Deserialization'/><category term='Model View View model'/><category term='vb.net interview questions'/><category term='asp.net'/><category term='Nunit'/><category term='Data Contract'/><category term='J2EE'/><category term='Site'/><category term='Tuples'/><category term='garbage'/><category term='Datareader'/><category term='Sorting'/><category term='Readonly'/><category term='Cache'/><category term='Generator'/><category term='oops'/><category term='Mock'/><category term='Publisher'/><category term='application'/><category term='SOA'/><category term='sharepoint 2010 interview questions'/><category term='Strings'/><category term='arraylist'/><category term='MEF'/><category term='sharepoint'/><category term='Exception'/><category term='Ado.Net Interview Questions'/><category term='Framework'/><category term='Anonymous Method'/><category term='c# interview questions'/><category term='overloading'/><category term='WCF Interview Questions'/><category term='Java Interview Question'/><category term='Model View Controller'/><category term='code'/><category term='optimistic'/><category term='encapsulation'/><category term='unique'/><category term='Merge'/><category term='Asp.Net Interview Questions'/><category term='ROI'/><category term='cookies'/><category term='Localization'/><category term='Project'/><category term='.Net Interivew Question'/><category term='Extension'/><category term='Prototype'/><category term='ghosting'/><category term='Grid view'/><category term='Plug'/><category term='Anonymous Types'/><category term='Master Page'/><category term='Builders'/><category term='params'/><category term='.Net framework'/><category term='Database'/><category term='Validation'/><category term='Entity framework'/><category term='Design Pattern'/><category term='data Warehousing'/><category term='Ado.Net'/><category term='LINQ interview questions'/><category term='Splits'/><category term='Unique Key'/><category term='WPF'/><category term='Silverlight'/><category term='Volatile'/><category term='Data list'/><category term='Composite pattern'/><category term='MVVM'/><category term='SQL'/><category term='concatenation'/><category term='.Net Interview Question.'/><category term='MSDeploy'/><category term='Query Plan'/><category term='Constant'/><category term='ATLAS'/><category term='c#'/><category term='SQL Server Service Broker'/><category term='Workflow . WWF Interview Question'/><category term='Optional Arguments'/><category term='Modules'/><category term='.net'/><category term='WWF'/><category term='web.config'/><category term='Structures'/><category term='LINQ'/><category term='hashtable'/><category term='ForeGround'/><category term='MVP'/><category term='Keyword'/><category term='UML'/><category term='Ngen'/><category term='XML'/><category term='Aggregation'/><category term='Fragmentation'/><category term='regular expression'/><category term='Collection'/><category term='handler'/><category term='unboxing'/><category term='.Net Interivew Questions'/><category term='visual studio'/><category term='Webservices'/><category term='Regex'/><category term='Classes'/><category term='integration'/><category term='optimistic locking'/><category term='Association'/><category term='Socket'/><category term='Dynamic'/><category term='Partial Classes'/><category term='Moss'/><category term='Hungarian'/><category term='architecture'/><category term='Loadbalancing'/><category term='Service Contract'/><category term='Serialization'/><category term='state management'/><category term='Globalization'/><category term='DLR'/><category term='MVC'/><category term='contracts'/><category term='debugging'/><category term='The way small computer publishers work in India'/><category term='Acceptance'/><category term='Innerclass'/><category term='overflow'/><category term='Interface'/><category term='Azure'/><category term='Ajax'/><category term='BackGround'/><category term='GAC'/><category term='class'/><category term='Anonymous Type'/><category term='Database Optimization'/><category term='boxing'/><category term='Clustered'/><category term='Unit Testing'/><category term='authorization'/><category term='snippet'/><category term='Editable'/><category term='REST'/><category term='objects'/><category term='Dataadapter'/><category term='view state'/><category term='Statefull'/><category term='abstract class'/><category term='Caching'/><category term='S'/><category term='SQL Server Interview Questions'/><category term='Tracing'/><category term='Generics'/><category term='Casting'/><category term='API'/><category term='constructor'/><category term='Delegates'/><category term='Command'/><category term='SOAP'/><category term='Remoting'/><category term='stack'/><category term='Locking'/><category term='endpoints'/><category term='Webservice'/><category term='Data Grid'/><category term='Render'/><category term='Data'/><category term='WCF'/><category term='Composition'/><category term='Self Hosting'/><category term='abstraction'/><category term='.Net Interview Question'/><category term='Generic'/><category term='Locks'/><category term='Partial Methods'/><category term='Wiki'/><category term='binding'/><category term='Checked'/><title type='text'>c# and  .NET  interview questions  Shivprasad Koirala</title><subtitle type='html'>c# and  .NET  interview questions</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default?start-index=101&amp;max-results=100'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>528</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-2975462402612029057</id><published>2012-02-15T06:05:00.000-08:00</published><updated>2012-02-15T06:51:33.458-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Association'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='oops'/><category scheme='http://www.blogger.com/atom/ns#' term='Aggregation'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><category scheme='http://www.blogger.com/atom/ns#' term='Composition'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>3 Important Concepts: - Association, Aggregation and Composition.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;p&gt;&lt;a href="#Introduction"&gt;&lt;font size="2"&gt;Introduction&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="#Extractingrealworldrelationshipsfromrequirement"&gt;&lt;font size="2"&gt;Extracting real world relationships from requirement&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="#Requirement1(TheISArelationship)"&gt;&lt;font size="2"&gt;Requirement 1 (The IS A relationship)&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="#Requirement2(TheUsingrelationship:-Association)"&gt;&lt;font size="2"&gt;Requirement 2 (The Using relationship: - Association)&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="#Requirement_3_(TheUsingrelationshipwithParent:-Aggregation)"&gt;&lt;font size="2"&gt;Requirement 3 (The Using relationship with Parent: - Aggregation)&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="#Requirement4and5(TheDeathrelationship:-Composition)"&gt;&lt;font size="2"&gt;Requirement 4 and 5 (The Deathrelationship: - Composition)&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="#Puttingthingstogether"&gt;&lt;font size="2"&gt;Putting things together&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="#Thesourcecode"&gt;&lt;font size="2"&gt;The source code&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="#Summarizing"&gt;&lt;font size="2"&gt;Summarizing&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;p&gt;&lt;a href="#VideoonAssociation,AggregationandComposition"&gt;&lt;font size="2"&gt;Video on Association, Aggregation and Composition&lt;/font&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Introduction"&gt;Introduction&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;In this article we will try to understand 3 important concepts association, aggregation and composition.&lt;br /&gt;We will also try to understand in what kind of scenarios do we need them. These 3 concepts have really confused lots of developers and in this article my attempt would be to present the concepts in a simplified manner with some real world examples.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Extractingrealworldrelationshipsfromrequirement"&gt;Extracting real world relationships from requirement&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;The whole point of OOP is that your code replicates the real world object, thus making your code readable and maintainable. The time we say real world, real world have relationships. Let’s consider the simple requirement listed below:-&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Manager is anemployee of XYZ limited corporation.&lt;/li&gt;&lt;li&gt;Manager uses a swipe card to enter XYZ premises.&lt;/li&gt;&lt;li&gt;Manager has workers who work under him.&lt;/li&gt;&lt;li&gt;Manager has the responsibility of ensuring that the project is successful.&lt;/li&gt;&lt;li&gt;Manager's salary will be judged based on project success.&lt;/li&gt;&lt;/ol&gt;If you flesh out the above 5 point requirement we can easily visualize 4 relationships:-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Inheritance&lt;/li&gt;&lt;li&gt;Aggregation&lt;/li&gt;&lt;li&gt;Association&lt;/li&gt;&lt;li&gt;Composition&lt;/li&gt;&lt;/ul&gt;Let’s understand them one by one.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Requirement1(TheISArelationship)"&gt;Requirement 1 (The IS A relationship)&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;If you see the first requirement (Manager is an employee of XYZ limited corporation) it’s a parent child relationship or inheritance relationship. The sentence above specifies that Manager is a type of employee, in other words we will have two classes one the parent class “Employee” and the other a child class “Manager” which will inherit from “Employee” class.&lt;br /&gt;&lt;br /&gt;&lt;i&gt;Note: -The scope of this article is only limited to aggregation, association and composition. So we will not discuss inheritancein this article as its pretty straight forward and I am sure you can get1000 of articles on the net which will help you in understanding the same.&lt;/i&gt;&lt;br /&gt;&lt;i&gt;&lt;br /&gt;&lt;/i&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Requirement2(TheUsingrelationship:-Association)"&gt;Requirement 2 (The Using relationship: - Association)&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;The requirement 2 is an interesting requirement (Manager uses a swipe card to enter XYZ premises). In this requirement the manager object and swipe card object use each other but they have their own object life time. In other words they can exist without each other. The most important point in this relationship is that there is no single owner.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-YYIwfISehoI/Tzu52L9lMII/AAAAAAAAD6Y/3w5o8ftpekc/s450/relation1.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;The above diagram shows howthe “SwipeCard”   class uses the “Manager” class and the “Manager” class uses the “SwipeCard” class. You can also see how we can create the object of the “Manager” class and “SwipeCard” independently and they can have their own object life time.&lt;br /&gt;&lt;br /&gt;This relationship is called as the “Association” relationship.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;/b&gt;&lt;b&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Requirement_3_(TheUsingrelationshipwithParent:-Aggregation)"&gt;Requirement 3 (The Using relationship with Parent: - Aggregation)&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;The third requirement from our list (Manager has workers who work under him) denotes the same type ofrelationship like association but with a difference that one of them is an owner. So as per the requirement the “Manager” object will own “Workers” object.&lt;br /&gt;&lt;br /&gt;The child “Worker” objects can not belong to any other objects. For instance the “Worker” object cannot belong to the “SwipeCard” object.&lt;br /&gt;&lt;br /&gt;But But….the “Worker” object can have his own life time which is completely disconnected from the “Manager” object. Looking from a different perspective it means that if the “Manager” object is deleted the “Worker” object does not die.&lt;br /&gt;&lt;br /&gt;This relationship is termed as the “Aggregation” relationship.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-KCH3dA1qtPg/Tzu6DGn5rsI/AAAAAAAAD6g/J8ga7-YBrCc/s450/relation2.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Requirement4and5(TheDeathrelationship:-Composition)"&gt;Requirement 4 and 5 (The Deathrelationship: - Composition)&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;The last two requirements are actually logically one.  If you read closely both the requirements which are as follows:-&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Manager has the responsibility of ensuring that the project is successful.&lt;/li&gt;&lt;li&gt;Manager's salary will be judged based on project success.&lt;/li&gt;&lt;/ol&gt;Below is the conclusion from analyzing the above requirements:-&lt;br /&gt;&lt;ol&gt;&lt;li&gt;Manager and the project objects are dependent on each other.&lt;/li&gt;&lt;li&gt;The lifetimes of both the objects are same.  In other words the project will not be successful if the manager is not good and manager will not get good increments if project has issues.&lt;/li&gt;&lt;/ol&gt;Below is how the class formation will look like. You can also see when I go to create the project object it needs the manager object.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-zSFig97JeT0/Tzu6LA4SJfI/AAAAAAAAD6o/9c0tFZ4nqzc/s450/relation3.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;This relationship is termed as the composition relationship. In this relationship both objects are heavily dependent on each other. In other words if goes for garbage collection the other also has to garbage collected , or putting from a different perspective the life time of the objects are same. That’s why I have put in the heading “Death” relationship.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Puttingthingstogether"&gt;Putting things together&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;Below is a visual representation of how the relationships have emerged from the requirements.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-1fuqy375fX8/Tzu6WxgTADI/AAAAAAAAD6w/6ec06LJV-aU/s450/relation4.jpg" /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Thesourcecode"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Thesourcecode"&gt;The source code&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;You can also download source code for this article&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Summarizing"&gt;Summarizing&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;To avoid confusion hence forth in these 3 terms I have put forward a table below which will help us compare them from  3 angles owner , life time and child object.&lt;br /&gt;&lt;br /&gt;&lt;table border="1"&gt;&lt;tbody&gt;&lt;tr&gt;&lt;td&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Association&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Aggregation&lt;/b&gt;&lt;/td&gt;&lt;td&gt;&lt;b&gt;Composition&lt;/b&gt;&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Owner&lt;/b&gt;&lt;/td&gt;&lt;td&gt;No Owner&lt;/td&gt;&lt;td&gt;Single owner&lt;/td&gt;&lt;td&gt;Single Owner&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Life time&lt;/b&gt;&lt;/td&gt;&lt;td&gt;Have their own life time&lt;/td&gt;&lt;td&gt;Have their own life time.&lt;/td&gt;&lt;td&gt;Owners life time&lt;/td&gt;&lt;/tr&gt;&lt;tr&gt;&lt;td&gt;&lt;b&gt;Child object&lt;/b&gt;&lt;/td&gt;&lt;td&gt;No Child objects all are independent&lt;/td&gt;&lt;td&gt;Child objects belong to single parent.&lt;/td&gt;&lt;td&gt;Child objects belong to single parent.&lt;/td&gt;&lt;/tr&gt;&lt;/tbody&gt;&lt;/table&gt;&lt;b&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="VideoonAssociation,AggregationandComposition"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="VideoonAssociation,AggregationandComposition"&gt;Video on Association, Aggregation and Composition&lt;/a&gt;&lt;/b&gt;&lt;br /&gt;I have also added a video in case you do not want to read this long article.&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/0po_wmSEW1Q" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Just a note I have recorded around 500 videos, do have once a look at my videos on &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET, OOP, SQL Server, WCF, Silver light , LINQ , VSTS, Share Point, Design patterns , UML&lt;/a&gt; and lot more.&lt;br /&gt;&lt;br /&gt;Visit to get more stuff on &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Also visit for more author’s other blogs on &lt;a href="http://dotnetinter.livejournal.com/56555.html#VideoonAssociation,AggregationandComposition" target="_blank"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-2975462402612029057?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/2975462402612029057/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=2975462402612029057' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2975462402612029057'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2975462402612029057'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/02/3-important-concepts-association.html' title='3 Important Concepts: - Association, Aggregation and Composition.'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-YYIwfISehoI/Tzu52L9lMII/AAAAAAAAD6Y/3w5o8ftpekc/s72-c/relation1.jpg' height='72' width='72'/><thr:total>1</thr:total><georss:featurename> Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.116691199999998 71.61422839999999 20.0352762 74.1410834</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-420359878168266222</id><published>2012-02-13T02:15:00.000-08:00</published><updated>2012-02-13T02:15:36.841-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Essential Components'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Service Broker'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><title type='text'>SQL Server interview questions: - Elaborate the essential components of SQL Server Service broker?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;An &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions &lt;/a&gt;asked in the interview. So do read the following answer before going for an interview.&lt;br /&gt;&lt;br /&gt;Following are the essential components of SQL Server:-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;End-Points&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;The endpoints can be two applications running on different servers or instances, or they can be two applications running on the same server.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Message&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;A message is an entity that is exchanged between Server Brokers. A message must have a name and data type. Optionally, a message can have a validation on that type of data. A message is part of a conversation and it has a unique identifier as well as a unique sequence number to enforce message ordering.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Dialog&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;Dialog ensure messages to be read in the same order as they where put in to queue between endpoints. In short, it ensures proper ordered sequence of events at both ends for a message.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Conversation Group&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;Conversation Group is a logical grouping of Dialog. To complete a task you can need one or more dialog. For instance an online payment gateway can have two Dialog’s first is the “Address Check” and second is the “Credit Card Number” validation, these both dialog form your complete “Payment process”. So you can group both the dialogs in one Conversation Group.&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Message Transport&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;Message transport defines how the messages will be send across networks. Message transport is based on TCP/IP and FTP. There are two basic protocols “Binary Adjacent Broker Protocol” which is like TCP/IP and “Dialog Protocol” which like FTP.&lt;br /&gt;&lt;br /&gt;See the following video on calling a stored procedure using LINQ: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/rL4tqiaDwmM" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Click for more &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Visit for more author’s blog on &lt;a href="http://questpond.over-blog.com/article-sql-server-interview-questions-show-the-essential-components-of-sql-server-service-broker-99222106.html" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-420359878168266222?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/420359878168266222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=420359878168266222' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/420359878168266222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/420359878168266222'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/02/sql-server-interview-questions.html' title='SQL Server interview questions: - Elaborate the essential components of SQL Server Service broker?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/rL4tqiaDwmM/default.jpg' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.835877699999998 72.5617989 19.3160897 73.19351289999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-8291852751125633849</id><published>2012-02-09T03:13:00.000-08:00</published><updated>2012-02-09T03:13:18.903-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='UML'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Questions'/><title type='text'>.NET interview questions: - What are object diagrams in UML?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;One of the most expected &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt; on Unified Modeling Language (UML) asked to software engineer during .NET interview.&lt;br /&gt;&lt;br /&gt;Class represents shows the static nature of the system. Class diagrams shows the types and how they are linked. Classes come to live only when objects are created from them. Object diagram gives a pictorial representation of class diagram at any point of time. Below figure ‘Object diagram’ shows how a class looks in when actual objects are created. We have shown a simple student and course relationship in the object diagram. So a student can take multiple courses. The class diagram shows the same with the multiplicity relationship. We have also shown how the class diagram then looks when the objects are created using the object diagram. We represent object with Object Name: Class Name. For instance in the below figure we have shown ‘Shiv : ClsStudent’ i.e ‘Shiv’ is the object and ‘ClsStudent’ the class. As the objects are created we also need to show data of the properties, the same is represented by ‘PropertyName=Value’ i.e. ‘StudentName=Shiv’.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-QNcDtqNWnfY/TzOprMnz7SI/AAAAAAAAD6Q/zix53WooI00/s1600/uml.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-QNcDtqNWnfY/TzOprMnz7SI/AAAAAAAAD6Q/zix53WooI00/s1600/uml.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Figure: - Object diagrams&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;The diagram also states that ‘ClsStudent’ can apply for many courses. The same is represented in object diagram by showing two objects one of the ‘Computer’ and the other of ‘English’. &lt;br /&gt;&lt;br /&gt;Also see the following video on Object diagram in UML as follows: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/InhoIpyMLvg" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Learn more on&lt;a href="http://www.questpond.com/" target="_blank"&gt; .NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;From more on author’s blog related to &lt;a href="http://questpond.over-blog.com/article-net-interview-questions-show-object-diagrams-in-uml-98930694.html" target="_blank"&gt;.NET interview questions&lt;/a&gt; click and visit&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-8291852751125633849?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/8291852751125633849/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=8291852751125633849' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8291852751125633849'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8291852751125633849'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/02/net-interview-questions-what-are-object.html' title='.NET interview questions: - What are object diagrams in UML?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-QNcDtqNWnfY/TzOprMnz7SI/AAAAAAAAD6Q/zix53WooI00/s72-c/uml.jpg' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.835877699999998 72.5617989 19.3160897 73.19351289999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-1874588805531082473</id><published>2012-02-05T23:13:00.000-08:00</published><updated>2012-02-06T01:27:38.436-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Events'/><category scheme='http://www.blogger.com/atom/ns#' term='Distributor'/><category scheme='http://www.blogger.com/atom/ns#' term='Generator'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='architecture'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Subscriber'/><title type='text'>SQL Server interview questions: - Explain architecture of Notification Services?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is the &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt; which more of Database administrator (DBA) oriented. Have a look before going for interview. So one can start answering this question as follows.&lt;br /&gt;&lt;br /&gt;Detail sections in SQL notification services:-&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Notification Service application: -&lt;/b&gt; It’s a simple user application which will be used to add subscription to the subscription database.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Event providers: -&lt;/b&gt; All events reside in Event providers. There are two event providers which are provided by default “File System watcher” and “SQL Server event provider”. “File System watcher” detects changes in operating system files. “SQL Server event provider” watches for SQL Server or analysis service database for change. You can also plug in custom event providers. When event providers find any change in database, they send the event in “Event” table.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Generator: -&lt;/b&gt; Generator checks the event database, when it finds any event it tries to match with the subscription and sends it to the notification database. So generator in short is the decision maker between the subscribers and the events.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Distributor: -&lt;/b&gt; Distributor continuously pools the “Notification” database for any “Notification’s” to be processed. If the distributor finds any entry, it retrieves it and formats it so that it can be delivered to the end recipient. Formatting is normally done using “XML” and “XSLT” for rendering purpose.&lt;br /&gt;&lt;br /&gt;After the formatting is done, it is then pushed to the “distribution providers”. They are nothing but medium of delivery. There are three built-in providers:-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;SMTP provider&lt;/li&gt;&lt;li&gt;File provider&lt;/li&gt;&lt;li&gt;HTTP  provider&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-N9xmRhf2qS4/Ty98hJrFj2I/AAAAAAAAD6I/aD8__geNM9I/s1600/sql.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="400" src="http://1.bp.blogspot.com/-N9xmRhf2qS4/Ty98hJrFj2I/AAAAAAAAD6I/aD8__geNM9I/s400/sql.jpg" width="520" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Figure: - Detail architecture of SQL notification services.&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;See the following video on calling a stored procedure using LINQ: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/rL4tqiaDwmM" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Click for more &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Visit for more author’s blog on &lt;a href="http://dotnetinter.livejournal.com/55735.html" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-1874588805531082473?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/1874588805531082473/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=1874588805531082473' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1874588805531082473'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1874588805531082473'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/02/sql-server-interview-questions-explain_05.html' title='SQL Server interview questions: - Explain architecture of Notification Services?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-N9xmRhf2qS4/Ty98hJrFj2I/AAAAAAAAD6I/aD8__geNM9I/s72-c/sql.jpg' height='72' width='72'/><thr:total>2</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.835877699999998 72.5617989 19.3160897 73.19351289999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-3519999911595528103</id><published>2012-02-01T01:08:00.000-08:00</published><updated>2012-02-01T01:09:14.504-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Stateless'/><category scheme='http://www.blogger.com/atom/ns#' term='Statefull'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><category scheme='http://www.blogger.com/atom/ns#' term='Loadbalancing'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Server interview questions:  - What is the stateless and stateful load balancing?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Following way you can answer this &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: medium;"&gt;Stateless load balancer&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;Stateless load balancer uses the hashing algorithm. It takes packet from the client and selects fields from the packet to be hashed. For instance from each client it can take IP address and port number and hash them in to an integer between 1 to number of servers. You can see from the figure we have four servers. So the load balancer takes the IP address and port and hashes them with a number between 1 to 4.  Depending on the number the client is directed to the server. For instance client A is directed to server 2, client b to server 1 and so on. Once the client is connected to a server it is always redirected to the same server.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-QdBnDBLRV4Y/Tyj_RKRhGiI/AAAAAAAAD5o/TlkYIAuFPPE/s1600/state1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-QdBnDBLRV4Y/Tyj_RKRhGiI/AAAAAAAAD5o/TlkYIAuFPPE/s1600/state1.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Figure: - Stateless load balancing&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;Advantage of stateless load balancing is that it’s simple. The biggest disadvantage is that it treats all clients equally and connects one client to one server always. That is if client A is connects to server 2 it will always connect to server 2.  This is irrespective of how many times client A sends request. So if client A sends 100 request and client B sends 10 requests even then client will be sent to server 2 for all the 100 request and client B to server 1 for all requests.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;&lt;span style="font-size: medium;"&gt;Stateful load balancer&lt;/span&gt;&lt;/b&gt;&lt;br /&gt;In stateful balancing the load balancer looks at each session and assigns it to the appropriate server based on load. In order that the load balancer can track each session it needs to know when the session starts and when it ends.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-HBv2IU6cMFc/Tyj_eqTCnlI/AAAAAAAAD5w/_4tVxGs8N_0/s1600/state2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-HBv2IU6cMFc/Tyj_eqTCnlI/AAAAAAAAD5w/_4tVxGs8N_0/s1600/state2.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Figure: - Stateful load balancing&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;You can see from the figure for every session the load balancer redirects the request to different servers.&lt;br /&gt;&lt;br /&gt;See the following video on Data Access layer used in Enterprise Application Block as follows: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/v-FMYxyxqAc" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Click for more &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Visit for more author’s blog on &lt;a href="http://dotnetinterviewquestion.wordpress.com/2012/02/01/sql-server-interview-questions-elaborate-stateless-and-stateful-load-balancing/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-3519999911595528103?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/3519999911595528103/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=3519999911595528103' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3519999911595528103'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3519999911595528103'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/02/sql-server-interview-questions-what-is.html' title='SQL Server interview questions:  - What is the stateless and stateful load balancing?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-QdBnDBLRV4Y/Tyj_RKRhGiI/AAAAAAAAD5o/TlkYIAuFPPE/s72-c/state1.jpg' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>LBS Rd, Kurla, Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.5953512 72.24594189999999 19.556616199999997 73.5093699</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-2096830037710323952</id><published>2012-01-28T05:02:00.000-08:00</published><updated>2012-01-28T05:02:44.925-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Interfaces'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='oops'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Questions'/><title type='text'>.NET interview questions:  - Elaborate interfaces in details with examples?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is the basic and all time favorite &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt; asked in the start or during the interview by the interviewer. So start with the definition &amp;amp; use an example to express the fundamental of the topic in more detail.&lt;br /&gt;&lt;br /&gt;In real world interface allows two disparate/ different objects to communicate with each other. For instance a human is a very different object when compared to television object. But they can still use the remote control interface to communicate with each other. Same holds true for interfaces in software, it defines a communication vocabulary between objects. Interfaces have empty methods and we can not create an object of interface.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-giEaELYOFRQ/TyPv5QNrDCI/AAAAAAAAD5g/dEo8RPEH_rU/s1600/image1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-giEaELYOFRQ/TyPv5QNrDCI/AAAAAAAAD5g/dEo8RPEH_rU/s1600/image1.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Figure: - Television interface&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;The other important thing is that interface brings in lot of uniformity in the project. They define common way of communication. Let’s consider a situation where you have multiple developers working on customer and supplier classes. You want that every developer should define the method name as ‘Update’ when these classes add the data to database. Developers are human’s so some would name it as update and some as add. You can tackle this situation by defining an interface with a method called as update. Now all the classes inherit from the same interface thus making update method constant through out the classes. You can also see how the client code methods are looking consistent in naming convention thus enforcing consistent communication interfaces across all classes.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-LoYw5VB3xvA/TyPvs7kPbxI/AAAAAAAAD5Y/DUBzDgJgqLw/s1600/image2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-LoYw5VB3xvA/TyPvs7kPbxI/AAAAAAAAD5Y/DUBzDgJgqLw/s1400/image2.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Figure: - Interface fundamentals&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;Also see the OOPS fundamental video on polymorphism and its types as follows: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/1Ce2MQ6YCBk" width="520"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Visit to get more stuff on &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Also visit for more author’s other blogs on &lt;a href="http://www.xpode.com/ShowArticle.aspx?ArticleId=545" target="_blank"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-2096830037710323952?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/2096830037710323952/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=2096830037710323952' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2096830037710323952'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2096830037710323952'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/01/net-interview-questions-elaborate_28.html' title='.NET interview questions:  - Elaborate interfaces in details with examples?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-giEaELYOFRQ/TyPv5QNrDCI/AAAAAAAAD5g/dEo8RPEH_rU/s72-c/image1.jpg' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.835877699999998 72.5617989 19.3160897 73.19351289999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-1044552046029631650</id><published>2012-01-25T02:34:00.000-08:00</published><updated>2012-01-25T02:34:02.456-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Fragmentation'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Splits'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Data'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Questions'/><title type='text'>SQL Server interview questions: - What do you mean about Fragmentation in SQL Server?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is the &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt; which are asked during the interview not so frequent. But still go through it once before going for the interview. &lt;br /&gt;&lt;br /&gt;Speed issues occur because of two major things&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Fragmentation.&lt;/li&gt;&lt;li&gt;Splits.&lt;/li&gt;&lt;/ul&gt;Splits have been covered in the first questions. But one other big issue is fragmentation. When database grows it will lead to splits, but what happens when you delete something from the database…HeHeHe life has lot of turns right. Ok let’s say you have two extents and each have two pages with some data. Below is a graphical representation. Well actually that’s now how things are inside but for sake of clarity lot of things have been removed.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-U-E6OlbHqi8/Tx_ZgfS09-I/AAAAAAAAD44/tmUsHoilUDo/s1600/s1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="71" src="http://2.bp.blogspot.com/-U-E6OlbHqi8/Tx_ZgfS09-I/AAAAAAAAD44/tmUsHoilUDo/s320/s1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Figure: - Data Distribution in Initial Stages&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;Now over a period of time some Extent and Pages data undergo some delete. Here is the modified database scenario. Now one observation you can see is that some page’s are not removed even when they do not have data. Second If SQL server wants to fetch all “Females” it has to span across to two extent and multiple pages within them. This is called as “Fragmentation” i.e. to fetch data you span across lot of pages and extents. This is also termed as “Scattered Data”.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-Bayn5kHChBQ/Tx_ZrLO-1EI/AAAAAAAAD5A/yANAHLGTaSk/s1600/s2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="71" src="http://4.bp.blogspot.com/-Bayn5kHChBQ/Tx_ZrLO-1EI/AAAAAAAAD5A/yANAHLGTaSk/s320/s2.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Figure: - Data Distribution after Deletes&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;What if the fragmentation is removed, you only have to search in two extent and two pages. Definitely, this will be faster as we are spanning across less entities&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-puqoSorbjjA/Tx_Z3F77xuI/AAAAAAAAD5I/1yZpbRB3eBU/s1600/s3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-puqoSorbjjA/Tx_Z3F77xuI/AAAAAAAAD5I/1yZpbRB3eBU/s1600/s3.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Figure: - Fragmentation removed&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;See the following video on calling a stored procedure using LINQ: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/rL4tqiaDwmM" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Click for more&lt;a href="http://www.questpond.com/" target="_blank"&gt; SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Visit for more author’s blog on &lt;a href="http://dotnetinterviewquestion.wordpress.com/2012/01/25/sql-server-interview-questions-mention-fragmentation-in-sql-server/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-1044552046029631650?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/1044552046029631650/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=1044552046029631650' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1044552046029631650'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1044552046029631650'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/01/sql-server-interview-questions-what-do.html' title='SQL Server interview questions: - What do you mean about Fragmentation in SQL Server?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-U-E6OlbHqi8/Tx_ZgfS09-I/AAAAAAAAD44/tmUsHoilUDo/s72-c/s1.jpg' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.835877699999998 72.5617989 19.3160897 73.19351289999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-3418018948381765144</id><published>2012-01-23T03:19:00.000-08:00</published><updated>2012-01-23T03:19:55.628-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='ROI'/><category scheme='http://www.blogger.com/atom/ns#' term='Project'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='oops'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Questions'/><title type='text'>Project management: .NET interview questions – Can you explain ROI?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is a typical management type &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt; asked by the interviewer to test the candidate’s skill on management. ROI is a measurement by which we can evaluate the financial value organization will gain from the project. ROI can also be used to measure returns from IT department to a company. In this book we will see ROI from the project perspective.&lt;br /&gt;&lt;br /&gt;Below is a generic formula for ROI: -&lt;br /&gt;&lt;pre&gt;ROI = (Expected profit in monetary terms / expected cost of the project) * 100&lt;/pre&gt;In one line ROI compares how much cost you will be incurring on the project to the total profit you will get out of the project.&lt;br /&gt;&lt;br /&gt;Let's take a simple example of a software company who is developing a simple software accounting application. The following is a rough spending and forecast revenue on the accounting application year wise.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Year 2007:-&lt;/b&gt; In this year they will built the accounting application. Total rough estimate is 20,000 Dollars. They will be selling per installation of the accounting software for 1500 dollars. Company estimates that only 10 installation of the accounting software will happen in the first year.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Year 2008:- &lt;/b&gt;In the next year i.e. 2008 we need to only spend 1000$ on the traveling charges of the installation engineer. In this year they expect 13 to 15 installations. So forecasting from minimum sales we assume that only 13 installations will happen, i.e. a net profit of approximately 20,000 dollars.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Year 2009:-&lt;/b&gt; From year 2009 onwards company expects to have fixed installation of 5 to 6 because of competitors coming in. So the net profit is around 10,000 dollars.&lt;br /&gt;&lt;br /&gt;Below figure ‘ROI’ shows how the ROI calculation with respect to the yearly view. In the below figure you can see we have the statistics and a graph drawn from the statistics. The ROI increases till 20 in 2008 and then again comes down to 10 in 2009.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-wq5FF027nfU/Tx1BQozIJ6I/AAAAAAAAD4w/uUVcJaTZYrs/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-wq5FF027nfU/Tx1BQozIJ6I/AAAAAAAAD4w/uUVcJaTZYrs/s1600/a.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Figure: - ROI&lt;/b&gt;&lt;/div&gt;&lt;br /&gt;Get to see one of the technical questions on .NET of OOPS topic as follows: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/THbpWIpQ6Z4" width="500"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Click and see more &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Also see from author’s blog for management based topics on &lt;a href="http://dotnetinterviewquestion.wordpress.com/2012/01/23/project-management-net-interview-questions-mention-roi/" target="_blank"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-3418018948381765144?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/3418018948381765144/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=3418018948381765144' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3418018948381765144'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3418018948381765144'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/01/project-management-net-interview.html' title='Project management: .NET interview questions – Can you explain ROI?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-wq5FF027nfU/Tx1BQozIJ6I/AAAAAAAAD4w/uUVcJaTZYrs/s72-c/a.jpg' height='72' width='72'/><thr:total>1</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.835877699999998 72.5617989 19.3160897 73.19351289999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-2652047265037650775</id><published>2012-01-22T23:17:00.000-08:00</published><updated>2012-01-22T23:18:36.358-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Interface'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net framework'/><title type='text'>Visual studio and .NET tips and tricks 14:- Implement interfaces with just a right click</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/uJyOOKXZsj4" width="500"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-2652047265037650775?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/2652047265037650775/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=2652047265037650775' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2652047265037650775'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2652047265037650775'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/01/visual-studio-and-net-tips-and-tricks.html' title='Visual studio and .NET tips and tricks 14:- Implement interfaces with just a right click'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/uJyOOKXZsj4/default.jpg' height='72' width='72'/><thr:total>1</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.835877699999998 72.5617989 19.3160897 73.19351289999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5680759312823818295</id><published>2012-01-19T02:09:00.000-08:00</published><updated>2012-01-19T02:09:56.428-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Clustered'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Questions'/><title type='text'>SQL Server interview questions: - Explain two types of indexes?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is the &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt; most asked during the interview so do revise before you go for the interview.&lt;br /&gt;There are basically two types of indexes:-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Clustered Indexes.&lt;/li&gt;&lt;li&gt;Non-Clustered Indexes.&lt;/li&gt;&lt;/ul&gt;Every thing is same for both the indexes i.e. it uses “B-TREE” for searching data. However, the main difference is the way it stores physical data&lt;br /&gt;In clustered index, the non-leaf level actually points to the actual data.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://www.questpond.com/" target="_blank"&gt;&lt;/a&gt;&lt;a href="http://www.questpond.com/" target="_blank"&gt;&lt;/a&gt;&lt;a href="http://3.bp.blogspot.com/-C5O_SOvQqgU/TxfpDc-JWpI/AAAAAAAAD4g/oG92WxL-syQ/s1600/a1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="192" src="http://3.bp.blogspot.com/-C5O_SOvQqgU/TxfpDc-JWpI/AAAAAAAAD4g/oG92WxL-syQ/s320/a1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Figure: - Clustered Index Architecture&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;In Non-Clustered index the leaf nodes point to pointers (they are rowid’s) which then point to actual data.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-AQX9nZbTbUY/TxfpgUmv0oI/AAAAAAAAD4o/0WnddmPrNH0/s1600/a2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="220" src="http://4.bp.blogspot.com/-AQX9nZbTbUY/TxfpgUmv0oI/AAAAAAAAD4o/0WnddmPrNH0/s320/a2.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Figure: - Non-Clustered Index has pointers&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;So here is what the main difference is in clustered and non-clustered, in clustered when we reach the leaf nodes we are on the actual data. In non-clustered indexes, we get a pointer, which then points to the actual data.&lt;br /&gt;&lt;br /&gt;Therefore, after the above fundamentals following are the basic differences between them:-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;indexes as we have pointers, which is logical arrangement we do need this compulsion. Also, note in clustered index actual data as to be sorted in same way as the clustered indexes are. While in non-clustered&lt;/li&gt;&lt;li&gt;So we can have only one clustered index on a table as we can have only one physical order while we can have more than one non-clustered indexes.&lt;/li&gt;&lt;/ul&gt;Also see the following video calling a stored procedure using LINQ: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/rL4tqiaDwmM" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Click for more &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Visit for more author’s blog on &lt;a href="http://dotnetinter.livejournal.com/54289.html" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5680759312823818295?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5680759312823818295/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5680759312823818295' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5680759312823818295'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5680759312823818295'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/01/sql-server-interview-questions-explain.html' title='SQL Server interview questions: - Explain two types of indexes?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-C5O_SOvQqgU/TxfpDc-JWpI/AAAAAAAAD4g/oG92WxL-syQ/s72-c/a1.jpg' height='72' width='72'/><thr:total>2</thr:total><georss:featurename> Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.1176042 71.61422839999999 20.034363199999998 74.1410834</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-1523211060004026501</id><published>2012-01-16T23:52:00.000-08:00</published><updated>2012-01-16T23:52:44.777-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='Project'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='oops'/><category scheme='http://www.blogger.com/atom/ns#' term='Design'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>.NET interview questions: - Elaborate project life cycle?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is basic of &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt; which are mostly asked to 1 year experience and above candidates.&lt;br /&gt;&lt;br /&gt;So here is a simplified answer we have put in front with a diagram so that you can learn in a more easier manner.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-Ld9VKrmrIC8/TxUn5GXsp7I/AAAAAAAAD4Y/U5rETlQ1JvM/s1600/ajay.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-Ld9VKrmrIC8/TxUn5GXsp7I/AAAAAAAAD4Y/U5rETlQ1JvM/s1600/ajay.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Figure: - Life cycle of a project&lt;/b&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;There are five stages of any project initiating, planning, executing, controlling, and closeout. These are general phases and change according to domain. Example when writing a book we will have the following mappings initiating (contacting publishers, getting copy right etc), planning (Table of contents of book, Number of chapters, tool to use, chapter wise deadlines etc), executing (Actually writing the book), controlling (proof reading, language checks, page alignments etc), and closeout (Finally printing and on the shelf for sale). Therefore, this classification is at very broader level, for software development the above figure shows the mapping.&lt;br /&gt;&lt;br /&gt;During Software project management interview, expected answer is requirement phase, design phase, coding phase, testing phase, and project closure. But you can just impress the answer by giving a general answer and then showing the mapping.&lt;br /&gt;&lt;br /&gt;Also see a question for differences between Abstraction and Encapsulation based on OOPS as follows: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/1Q4I63-hKcY" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Learn more on &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;From more on author’s blog related to &lt;a href="http://www.dotnetinterviewquestions.in/article_net-interview-questions:-can-you-elaborate-project-life-cycle_86.html" target="_blank"&gt;.NET interview questions&lt;/a&gt; click and visit.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-1523211060004026501?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/1523211060004026501/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=1523211060004026501' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1523211060004026501'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1523211060004026501'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/01/net-interview-questions-elaborate.html' title='.NET interview questions: - Elaborate project life cycle?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-Ld9VKrmrIC8/TxUn5GXsp7I/AAAAAAAAD4Y/U5rETlQ1JvM/s72-c/ajay.jpg' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.835877699999998 72.5617989 19.3160897 73.19351289999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-2049980430144120457</id><published>2012-01-13T23:19:00.000-08:00</published><updated>2012-01-16T01:43:23.790-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Partial Classes'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Partial Methods'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>4 real time use of Partial classes and partial methods</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;h3&gt;&lt;span style="font-weight: 400;"&gt;&lt;a href="#Introduction"&gt;Introduction&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: 400;"&gt;&lt;a href=#Fundamentalsofpartialclasses"&gt;Fundamentals of partial classes&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: 400;"&gt;&lt;a href="#Fundamentalsofpartialmethods"&gt;Fundamentals of partial methods&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: 400;"&gt;&lt;a href="#Use number 1:- ASP.NET auto generated code&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: 400;"&gt;&lt;a href="#Usenumber2:-LINQandEntityframework"&gt;Use number 2:- LINQ and Entity framework&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: 400;"&gt;&lt;a href="#Usenumber3:-Bettermaintenancebycompactinglargeclasses"&gt;Use number 3:- Better maintenance by compacting large classes&lt;/a&gt;&lt;/span&gt;&lt;br /&gt;&lt;span style="font-weight: 400;"&gt;&lt;a href="#Usenumber4:-Multiplepeopleworkingonthesameclass"&gt;Use number 4:- Multiple people working on the same class&lt;/a&gt;&lt;/span&gt;&lt;/h3&gt;&lt;div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Introduction"&gt;Introduction&lt;/a&gt;&lt;/h3&gt;Recently I was hunting about partial classes and the real time use of the same. Many of those postings found on google talked about the concept of partial classes and partial methods, but in what scenarios to use them very few highlighted.&lt;br /&gt;&lt;br /&gt;In this article we will first start with fundamentals of partial classes and methods and then discuss the 4 real time use of the same.&lt;br /&gt;&lt;br /&gt;I have also created a video of the same here where I have discussed about partial classes and shown the real time use of the same.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/ZEsS9-KfC70" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Fundamentalsofpartialclasses"&gt;Fundamentals of partial classes&lt;/a&gt;&lt;/h3&gt;A partial class allows a single class to be divided in to two separate physical files. During compile time these files get compiled in to single class.  For instance you can see in the below figure we have the customer class divided in to two different files “customer1.cs” and “customer2.cs”.&lt;br /&gt;&lt;br /&gt;During compilation these files gets compiled in to single class internally. So when you create an object of the customer class you will be able to see methods lying in both the physical files. For instance you can see “Add” method belongs to “customer1.cs” and “Delete” method belongs to “customer2.cs” , but when the customer object is created we can see both “Add” and “Delete” methods.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-jEyAJ6xDBbk/TxElrbSArRI/AAAAAAAAD3I/hizyx7QjwHw/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="215" src="http://3.bp.blogspot.com/-jEyAJ6xDBbk/TxElrbSArRI/AAAAAAAAD3I/hizyx7QjwHw/s320/2.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Fundamentalsofpartialmethods"&gt;Fundamentals of partial methods&lt;/a&gt;&lt;/h3&gt;There is one more important concept in partial classes called as partial methods. Partial methods helps us to define a method definition in one of the physical files and we can implement that method in the other physical files as shown in the below figure.&lt;br /&gt;&lt;br /&gt;In the below figure you can see we have defined “Validate” method in “Customer1.cs” and this validate method is implemented in “Customer2.cs”. Please note the partial keywords attached to both of these methods.&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-R5bvGVUxyZw/TxEly9wrDRI/AAAAAAAAD3Q/IcsYdricZtM/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="155" src="http://2.bp.blogspot.com/-R5bvGVUxyZw/TxEly9wrDRI/AAAAAAAAD3Q/IcsYdricZtM/s320/3.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Usenumber1:-ASP.NETautogeneratedcode"&gt;Use number 1:- ASP.NET auto generated code&lt;/a&gt;&lt;/h3&gt;The biggest use of partial classes is in technologies where there is code generation. Microsoft team themselves use partial classes in ASP.NET, LINQ and EF code generation. For instance when we look at ASP.NET there are two parts one is the auto generated code of a page and the other is behind code where you write your custom logic.&lt;br /&gt;&lt;br /&gt;The custom logic is written in the “.aspx.cs” file while the auto generated logic is in “.aspx.designer.cs” file as shown in the below figure.&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-chcA3ptsBuM/TxEl5m3eatI/AAAAAAAAD3Y/KNw1Oyw9X1w/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-chcA3ptsBuM/TxEl5m3eatI/AAAAAAAAD3Y/KNw1Oyw9X1w/s1600/4.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;As a developer you would like the auto generated code to do his work i.e. generate code when you drag and drop a button the ASP.NET designer.&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-J7JH-Z9O6NY/TxEmAsE5ihI/AAAAAAAAD3g/BJN8munZwuA/s1600/5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-J7JH-Z9O6NY/TxEmAsE5ihI/AAAAAAAAD3g/BJN8munZwuA/s1600/5.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;Below is how the code snippet of the auto generated code looks like.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;public partial class WebForm1 {&lt;br /&gt;        &lt;br /&gt;        /// &lt;summary&gt;&lt;br /&gt;        /// form1 control.&lt;br /&gt;        /// &lt;/summary&gt;&lt;br /&gt;        /// &lt;remarks&gt;&lt;br /&gt;        /// Auto-generated field.&lt;br /&gt;        /// To modify move field declaration from designer file to code-behind file.&lt;br /&gt;        /// &lt;/remarks&gt;&lt;br /&gt;        protected global::System.Web.UI.HtmlControls.HtmlForm form1;&lt;br /&gt;        &lt;br /&gt;        /// &lt;summary&gt;&lt;br /&gt;        /// Button1 control.&lt;br /&gt;        /// &lt;/summary&gt;&lt;br /&gt;        /// &lt;remarks&gt;&lt;br /&gt;        /// Auto-generated field.&lt;br /&gt;        /// To modify move field declaration from designer file to code-behind file.&lt;br /&gt;        /// &lt;/remarks&gt;&lt;br /&gt;        protected global::System.Web.UI.WebControls.Button Button1;&lt;br /&gt;        &lt;br /&gt;        /// &lt;summary&gt;&lt;br /&gt;        /// Label1 control.&lt;br /&gt;        /// &lt;/summary&gt;&lt;br /&gt;        /// &lt;remarks&gt;&lt;br /&gt;        /// Auto-generated field.&lt;br /&gt;        /// To modify move field declaration from designer file to code-behind file.&lt;br /&gt;        /// &lt;/remarks&gt;&lt;br /&gt;        protected global::System.Web.UI.WebControls.Label Label1;&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;At the same time you would also like to customize the code in some other file so that the auto generation part is not disturbed. For the same ASP.NET provides the “.aspx.cs” file which is a partial class where in you can go put your own custom logic.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;public partial class WebForm1 : System.Web.UI.Page&lt;br /&gt;    {&lt;br /&gt;        protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;        {&lt;br /&gt;            // Your custom logic&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;This is only possible when the class is split in two physical files but united via the partial keyword. So if you see any ASP.NET behind code class files it’s marked by the word partial.&lt;br /&gt;So by using the partial keyword in ASP.NET the Microsoft team has made VS and developer work side by side thus not fiddling with each other’s code and thus increasing productivity.&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-2MKLkwEixzw/TxEmgvlRuNI/AAAAAAAAD3o/h7IJd5qO9yQ/s1600/6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="181" src="http://3.bp.blogspot.com/-2MKLkwEixzw/TxEmgvlRuNI/AAAAAAAAD3o/h7IJd5qO9yQ/s320/6.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Usenumber2:-LINQandEntityframework"&gt;Use number 2:- LINQ and Entity framework&lt;/a&gt;&lt;/h3&gt;LINQ and EF also use partial classes and methods heavily because of the auto generation nature of these technologies. So when you drag tables in these framework they create auto generated classes as shown in the below figure.&lt;br /&gt;&lt;br /&gt;In the below figure you can see how the auto generated code has partial classes and partial methods.&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-C2bg3bhI0fE/TxEmmZ6at1I/AAAAAAAAD3w/YK9LBI0vMKY/s1600/7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="194" src="http://2.bp.blogspot.com/-C2bg3bhI0fE/TxEmmZ6at1I/AAAAAAAAD3w/YK9LBI0vMKY/s320/7.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;div align="center"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-PRCJbgPSCsM/TxEmt6gMXfI/AAAAAAAAD34/eOcX7L6FtD8/s1600/8.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="112" src="http://3.bp.blogspot.com/-PRCJbgPSCsM/TxEmt6gMXfI/AAAAAAAAD34/eOcX7L6FtD8/s320/8.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;The partial methods later can be extended to put custom logic. For instance you can see in the below code for the above autogenerated class “tblCustomer” we have used partial methods to override the “OnCustomerCodeChanged” event to ensure that customer code is not more than 8 length.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;public partial class tblCustomer&lt;br /&gt;    {&lt;br /&gt;        partial void OnCustomerCodeChanged()&lt;br /&gt;        {&lt;br /&gt;            if (_CustomerCode.Length &amp;gt; 8)&lt;br /&gt;            {&lt;br /&gt;                throw new Exception("Customer code can not be greater than 8");&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;So by using partial classes and partial methods, LINQ and EF framework keep auto generating classes and by using partial methods we can customize the class with our own logic. &lt;br /&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Usenumber3:-Bettermaintenancebycompactinglargeclasses"&gt;Use number 3:- Better maintenance by compacting large classes&lt;/a&gt;&lt;/h3&gt;The other important use of partial classes is for better maintenance of the project. If you have large classes with lots of methods as shown in the below figure , it’s a bit pain to maintain those classes.&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-NCnV5LOId3U/TxEm0EviS7I/AAAAAAAAD4A/xEOXj5Szuto/s1600/9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-NCnV5LOId3U/TxEm0EviS7I/AAAAAAAAD4A/xEOXj5Szuto/s1600/9.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;By using partial classes you can split them in to physical files as shown in the below figure thus making your project better and easy to maintain.&lt;br /&gt;&lt;br /&gt;&lt;div align="center"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-9oVSPmrsbtA/TxEm8mZ9v6I/AAAAAAAAD4I/GiSLGSuvGq8/s1600/10.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-9oVSPmrsbtA/TxEm8mZ9v6I/AAAAAAAAD4I/GiSLGSuvGq8/s1600/10.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;&lt;h3&gt;&lt;a href="http://www.blogger.com/blogger.g?blogID=5571184103023259871" name="Usenumber4:-Multiplepeopleworkingonthesameclass"&gt;Use number 4:- Multiple people working on the same class&lt;/a&gt;&lt;/h3&gt;&lt;div align="center"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-11SHBQ0A8mQ/TxEnBgsVWHI/AAAAAAAAD4Q/rK8JU2QUzQs/s1600/11.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="191" src="http://2.bp.blogspot.com/-11SHBQ0A8mQ/TxEnBgsVWHI/AAAAAAAAD4Q/rK8JU2QUzQs/s320/11.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;/div&gt;The last and final real time I see of partial classes is when we want simultaneously two developers to work in the same class. I agree this can be a very rare use as there are better options like using a version control software like TFS or Sub version, but in case you want something quick and local this option is not bad at all.&lt;br /&gt;&lt;br /&gt;You can also watch my 500 videos on different technologies like &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET, C#, Silverlight, Azure, VSTS, WCF, WPF, WWF, Share Point, design patterns, UML&lt;/a&gt; and lots more.&lt;br /&gt;&lt;br /&gt;For other author's blog on &lt;a href="http://questpond.tumblr.com/post/15940268675/4-real-time-use-of-partial-classes-and-partial-methods#Usenumber3:-Bettermaintenancebycompactinglargeclasses" target="_blank"&gt;.NET Interview&lt;/a&gt; articles.&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-2049980430144120457?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/2049980430144120457/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=2049980430144120457' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2049980430144120457'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2049980430144120457'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/01/4-real-time-use-of-partial-classes-and.html' title='4 real time use of Partial classes and partial methods'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/ZEsS9-KfC70/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5277725120943827428</id><published>2012-01-09T00:22:00.000-08:00</published><updated>2012-01-09T00:25:09.146-08:00</updated><title type='text'>C# interview question: - Explain partial methods in partial classes of C# and .NET?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Partial methods are important components of partial classes. Read and click on the following link in case you are new to &lt;a href="http://computerauthor.blogspot.com/2012/01/c-interview-questions-show-partial.html" target="_blank"&gt;partial classes.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Partial methods helps us to define a method definition in one of the physical files and we can implement that method in the other physical files as shown in the below figure.&lt;br /&gt;&lt;br /&gt;In the below figure you can see we have defined “Validate” method in “Customer1.cs” and this validate method is implemented in “Customer2.cs”. Please note the partial keywords attached to both of these methods.&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://pics.livejournal.com/dotnetinter/pic/000axfaf" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img height="248" src="http://pics.livejournal.com/dotnetinter/pic/000axfaf" width="510" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;b&gt;Figure: -&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;Also see the following video on Partial methods: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="360" src="http://www.youtube.com/embed/ZEsS9-KfC70?feature=player_embedded" width="500"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Click for more learning stuffs on&lt;a href="http://www.questpond.com/" target="_blank"&gt; C# interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Click it for author’s more training stuffs on &lt;a href="http://dotnetinter.livejournal.com/53724.html" target="_blank"&gt;C# interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5277725120943827428?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5277725120943827428/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5277725120943827428' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5277725120943827428'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5277725120943827428'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/01/c-interview-question-explain-partial.html' title='C# interview question: - Explain partial methods in partial classes of C# and .NET?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/ZEsS9-KfC70/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-2125478089615262327</id><published>2012-01-07T04:43:00.000-08:00</published><updated>2012-01-07T04:43:20.147-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Methods'/><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Classes'/><title type='text'>C# interview questions:  - Show partial classes in C# and .NET?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;A partial class allows a single class to be divided in to two separate physical files. During compile time these files get compiled in to single class.  For instance you can see in the below figure we have the customer class divided in to two different files “customer1.cs” and “customer2.cs”.&lt;br /&gt;&lt;br /&gt;During compilation these files gets compiled in to single class internally. So when you create an object of the customer class you will be able to see methods lying in both the physical files. For instance you can see “Add” method belongs to “customer1.cs” and “Delete” method belongs to “customer2.cs” , but when the customer object is created we can see both “Add” and “Delete” methods.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-xoW5op5AYt8/Twg9GzYCodI/AAAAAAAAD24/Qkb2uNLW9Kg/s1600/cimage.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-xoW5op5AYt8/Twg9GzYCodI/AAAAAAAAD24/Qkb2uNLW9Kg/s1600/cimage.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;strong&gt; Figure: -&lt;/strong&gt;&lt;/div&gt;Also want to see in the form of video to understand in better form see the following video on partial class: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/ZEsS9-KfC70?hd=1" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Visit for more &lt;a href="http://www.questpond.com/" target="_blank"&gt;C# interview questions.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;For more author's blog on &lt;a href="http://dotnetinter.livejournal.com/53419.html" target="_blank"&gt;C# interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-2125478089615262327?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/2125478089615262327/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=2125478089615262327' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2125478089615262327'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2125478089615262327'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/01/c-interview-questions-show-partial.html' title='C# interview questions:  - Show partial classes in C# and .NET?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-xoW5op5AYt8/Twg9GzYCodI/AAAAAAAAD24/Qkb2uNLW9Kg/s72-c/cimage.JPG' height='72' width='72'/><thr:total>1</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.835877699999998 72.5617989 19.3160897 73.19351289999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-3106136414376936410</id><published>2012-01-05T01:05:00.000-08:00</published><updated>2012-01-05T01:05:44.919-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Unit Testing'/><category scheme='http://www.blogger.com/atom/ns#' term='integration'/><category scheme='http://www.blogger.com/atom/ns#' term='Acceptance'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Design'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Questions'/><title type='text'>.NET interview questions: -Explain V-model and its working in testing?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;If you are senior software professional this &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt; may come across to check your skills on testing. If you new to this question then just go through it before the interview and if you are aware of it just revise it.&lt;br /&gt;&lt;br /&gt;This type of model was developed by testers to emphasis the importance of early testing. In this model testers are involved from requirement stage itself. So below is the diagram which shows how for every stage some testing activity is done to ensure that the project is moving as planned.&lt;br /&gt;&lt;strong&gt;&lt;br /&gt;For instance,&lt;/strong&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;In requirement stage we have acceptance test documents created by the testers. Acceptance test document outlines that if these test pass then customer will accept the software.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;In specification stage testers create the system test document. In the coming section system testing is explained in more elaborate fashion.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;In design stage we have integration documents created by the testers. Integration test documents define testing steps of how the components should work when integrated. For instance you develop a customer class and product class. You have tested the customer class and the product class individually. But in practical scenario the customer class will interact with the product class. So you also need to test is the customer class interacting with product class properly.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;In implement stage we have unit documents created by the programmers or testers.&lt;/li&gt;&lt;/ul&gt;Lets try to understand every of this testing phase in more detail.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Unit Testing&lt;/strong&gt;&lt;br /&gt;Starting from the bottom the first test level is "Unit Testing". It involves checking that each feature specified in the "Component Design" has been implemented in the component. In theory an independent tester should do this, but in practice the developer usually does it, as they are the only people who understand how a component works. The problem with a component is that it performs only a small part of the functionality of a system, and it relies on co-operating with other parts of the system, which may not have been built yet. To overcome this, the developer either builds, or uses special software to trick the component into believe it is working in a fully functional system.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Integration Testing&lt;/strong&gt;&lt;br /&gt;As the components are constructed and tested they are then linked together to check if they work with each other. It is a fact that two components that have passed all their tests, when connected to each other produce one new component full of faults. These tests can be done by specialists, or by the developers.&lt;br /&gt;&lt;br /&gt;Integration Testing is not focused on what the components are doing but on how they communicate with each other, as specified in the "System Design". The "System Design" defines relationships between components.&lt;br /&gt;&lt;br /&gt;The tests are organized to check all the interfaces, until all the components have been built and interfaced to each other producing the whole system.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;System Testing&lt;/strong&gt;&lt;br /&gt;Once the entire system has been built then it has to be tested against the "System Specification" to check if it delivers the features required. It is still developer focused, although specialist developers known as systems testers are normally employed to do it.&lt;br /&gt;In essence System Testing is not about checking the individual parts of the design, but about checking the system as a whole. In fact it is one giant component.&lt;br /&gt;System testing can involve a number of specialist types of test to see if all the functional and non-functional requirements have been met. In addition to functional requirements these may include the following types of testing for the non-functional requirements:&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Performance - Are the performance criteria met? &lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Volume - Can large volumes of information be handled?&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Stress - Can peak volumes of information be handled? &lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Documentation - Is the documentation usable for the system?&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Robustness - Does the system remain stable under adverse circumstances?&lt;/li&gt;&lt;/ul&gt;There are many others, the need for which is dictated by how the system is supposed to perform.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Acceptance Testing&lt;/strong&gt;&lt;br /&gt;Acceptance Testing checks the system against the "Requirements". It is similar to systems testing in that the whole system is checked but the important difference is the change in focus:&lt;br /&gt;Systems testing checks that the system that was specified has been delivered. Acceptance Testing checks that the system will deliver what was requested.&lt;br /&gt;The customer should always do acceptance testing and not the developer. The customer knows what is required from the system to achieve value in the business and is the only person qualified to make that judgment. This testing is more of getting the answer for whether is the software delivered as defined by the customer. It’s like getting a green flag from the customer that the software is up to the expectation and ready to be used.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-AsZrp0b5cwQ/TwVk4fofmnI/AAAAAAAAD2g/P6l_Wr6gnrE/s1600/v%252Cmodel+image.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="230" src="http://4.bp.blogspot.com/-AsZrp0b5cwQ/TwVk4fofmnI/AAAAAAAAD2g/P6l_Wr6gnrE/s320/v%252Cmodel+image.JPG" width="380" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;strong&gt;Figure: - V model cycle flow&lt;/strong&gt;&lt;/div&gt;&lt;div style="text-align: center;"&gt;&lt;strong&gt;&lt;br /&gt;&lt;/strong&gt;&lt;/div&gt;Also get a glance on the following video on Unit testing: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/G6LOI9JAnOk" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Click for more learning stuffs on &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Click it for author’s more training stuffs on &lt;a href="http://dotnetinter.livejournal.com/53171.html" target="_blank"&gt;.NET interview questions&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-3106136414376936410?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/3106136414376936410/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=3106136414376936410' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3106136414376936410'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3106136414376936410'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2012/01/net-interview-questions-explain-v-model.html' title='.NET interview questions: -Explain V-model and its working in testing?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-AsZrp0b5cwQ/TwVk4fofmnI/AAAAAAAAD2g/P6l_Wr6gnrE/s72-c/v%252Cmodel+image.JPG' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.117360199999997 71.61422839999999 20.0346072 74.1410834</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-1669515147715726574</id><published>2011-12-24T00:35:00.000-08:00</published><updated>2011-12-24T01:36:07.581-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Publisher'/><category scheme='http://www.blogger.com/atom/ns#' term='Distributor'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='Subscriber'/><title type='text'>SQL Server interview questions: - State publisher, distributor and subscriber in “Replication”?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is the most expected asked &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt; during the interview by the interviewer.&lt;br /&gt;&lt;br /&gt;Publisher is the one who owns the database and is the main source for data. Publisher identifies what data should be distributed across.&lt;br /&gt;&lt;br /&gt;Distributor is a bridge between publisher and subscriber. Distributor gathers all the published data and holds it until it sends it across to all subscriber. So as it is a bridge who sits in between publisher and subscriber, it supports multiple publisher and subscriber concept.&lt;br /&gt;&lt;br /&gt;Subscriber is the end source or the final destination to which data has to be transmitted.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-oOZOpFVfy-E/TvWNGHbgWNI/AAAAAAAAD2U/CyN4YkDyF8I/s500/ajay.jpg" /&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Figure: - Publisher, Distributor and Subscriber in action&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;View video on Query Plan, Logical/Physical operators in SQL Server as follows: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/ZgD3o_zrEe0" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Click for more &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Visit for more author’s blog on &lt;a href="http://dotnetinter.livejournal.com/52808.html" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-1669515147715726574?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/1669515147715726574/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=1669515147715726574' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1669515147715726574'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1669515147715726574'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/12/sql-server-interview-questions-state.html' title='SQL Server interview questions: - State publisher, distributor and subscriber in “Replication”?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-oOZOpFVfy-E/TvWNGHbgWNI/AAAAAAAAD2U/CyN4YkDyF8I/s72-c/ajay.jpg' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.835877699999998 72.5617989 19.3160897 73.19351289999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-8633587649805692229</id><published>2011-12-22T01:36:00.000-08:00</published><updated>2011-12-22T01:37:41.223-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>SQL Server interview questions: - Different types of relationship existing in database designing?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is one of the most favorite SQL Server interview questions asked by the interviewer during the interview.&lt;br /&gt;&lt;br /&gt;We have tried to keep answer as simple as we can. So starts the answer as, basically there are three major relationship models: -&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;One-to-one&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-uhKFe0oug2M/TvL4PhMaanI/AAAAAAAAD1w/Qtci1QDCMsw/s1600/ajay1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="303" src="http://1.bp.blogspot.com/-uhKFe0oug2M/TvL4PhMaanI/AAAAAAAAD1w/Qtci1QDCMsw/s320/ajay1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Figure:  - One-to-One relationship ER diagram&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;One-to-many&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;In this many records in one table corresponds to the one record in other table. Example: - Every one customer can have multiple sales. So there exist one-to-many relationships between customer and sales table.&lt;br /&gt;&lt;br /&gt;One “Asset” can have multiple “Maintenance”. So “Asset” entity has one-to-many relationship between them as the ER model shows below.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-6rl7atEs1U8/TvL4ZU-DiuI/AAAAAAAAD18/RnlRPaiWwm4/s1600/ajay2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="295" src="http://3.bp.blogspot.com/-6rl7atEs1U8/TvL4ZU-DiuI/AAAAAAAAD18/RnlRPaiWwm4/s320/ajay2.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;Figure:  - One-to-Many Relationship ER diagram&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;&lt;b&gt;Many-to-many&lt;/b&gt;&lt;/li&gt;&lt;/ul&gt;In this, one record in one table corresponds to many rows in other table and also vice-versa. For instance :- In a company one employee can have many skills like java , c# etc and also one skill can belong to many employees.&lt;br /&gt;&lt;br /&gt;Given below is a sample of many-to-many relationship. One employee can have knowledge of multiple “Technology”. So in order to implement this we have one more table “Employee Technology” which is linked to the primary key of “Employee” and “Technology” table.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-OLcYQqfb10Q/TvL4goAw8dI/AAAAAAAAD2I/Tdf4gfKC7PA/s1600/ajay3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="301" src="http://3.bp.blogspot.com/-OLcYQqfb10Q/TvL4goAw8dI/AAAAAAAAD2I/Tdf4gfKC7PA/s320/ajay3.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Figure:  - Many-to-Many Relationship ER diagram&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Also see the following video on differences between unique key and primary key in SQL Server as follows:-&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/8iIvyNPwruU?hd=1" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Visit for more &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Get more from author’s blog for &lt;a href="http://dotnetinter.livejournal.com/52534.html" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-8633587649805692229?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/8633587649805692229/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=8633587649805692229' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8633587649805692229'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8633587649805692229'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/12/sql-server-interview-questions.html' title='SQL Server interview questions: - Different types of relationship existing in database designing?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-uhKFe0oug2M/TvL4PhMaanI/AAAAAAAAD1w/Qtci1QDCMsw/s72-c/ajay1.jpg' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.835877699999998 72.5617989 19.3160897 73.19351289999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-208233295245275935</id><published>2011-12-19T00:38:00.000-08:00</published><updated>2011-12-19T00:40:49.598-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='class'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='objects'/><category scheme='http://www.blogger.com/atom/ns#' term='Exception'/><category scheme='http://www.blogger.com/atom/ns#' term='stack'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='overflow'/><title type='text'>.NET interview questions: - Below are simple two classes Class1 creates objects of Class2 and Class2 creates object of Class1, What will happen?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;See the following snap code: -&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;class Class1 &lt;br /&gt;{&lt;br /&gt; Class2 o = new Class2();&lt;br /&gt;}&lt;br /&gt;class Class2&lt;br /&gt;{&lt;br /&gt; Class1 o = new Class1();&lt;br /&gt;}&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;b&gt;Answer:&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;Both the classes are creating objects of each other due which the object will pile up in the memory and lead to "StackOverFlowException". Below is the error image which is displayed once the memory is overused.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-AcOWXcDMfyE/Tu70pqla_6I/AAAAAAAAD1k/hhYzAv41jvk/s1600/ajay.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="187" src="http://4.bp.blogspot.com/-AcOWXcDMfyE/Tu70pqla_6I/AAAAAAAAD1k/hhYzAv41jvk/s320/ajay.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;See the following video on regular expressions along with some practical demonstrations as follows: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/C2zm0roE-Uc?hd=1" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Visit to get more stuff on &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Also visit for more author’s other blogs on &lt;a href="http://dotnetinter.livejournal.com/52392.html" target="_blank"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;a href="http://dotnetinter.livejournal.com/52392.html" target="_blank"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://dotnetinter.livejournal.com/52392.html" target="_blank"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-208233295245275935?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/208233295245275935/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=208233295245275935' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/208233295245275935'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/208233295245275935'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/12/net-interview-questions-below-are.html' title='.NET interview questions: - Below are simple two classes Class1 creates objects of Class2 and Class2 creates object of Class1, What will happen?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-AcOWXcDMfyE/Tu70pqla_6I/AAAAAAAAD1k/hhYzAv41jvk/s72-c/ajay.JPG' height='72' width='72'/><thr:total>0</thr:total><georss:featurename> Mulund West, Mumbai, Maharashtra, India</georss:featurename><georss:point>19.1746739 72.9431038</georss:point><georss:box>19.1146894 72.8641398 19.234658399999997 73.0220678</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-4538889767257738090</id><published>2011-12-13T23:28:00.000-08:00</published><updated>2011-12-13T23:28:35.624-08:00</updated><title type='text'>Knowledge Sharing Session: - On concept of OOPS (Inheritance and Use of Virtual Keyword)</title><content type='html'>&lt;iframe width="480" height="270" src="http://www.youtube.com/embed/MaHZiZOWTvU?fs=1" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-4538889767257738090?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/4538889767257738090/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=4538889767257738090' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4538889767257738090'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4538889767257738090'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/12/knowledge-sharing-session-on-concept-of.html' title='Knowledge Sharing Session: - On concept of OOPS (Inheritance and Use of Virtual Keyword)'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/MaHZiZOWTvU/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-1993537098041580105</id><published>2011-12-10T04:18:00.001-08:00</published><updated>2011-12-13T23:31:05.565-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Question'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Data Grid'/><category scheme='http://www.blogger.com/atom/ns#' term='Repeater'/><category scheme='http://www.blogger.com/atom/ns#' term='Data list'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>.NET/ASP.NET interview questions: - While choosing design, when to consider Data grid, data list, or repeater?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is one of quiet often asked &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET/ASP.NET interview questions&lt;/a&gt; so prepare accordingly to answer it to the interviewer.&lt;br /&gt;&lt;br /&gt;Many of the developers make a blind choice of choosing data grid directly, but that is not the right way.&lt;br /&gt;&lt;br /&gt;Data grid provides ability to allow the end-user to sort, page, and edit its data. However, it comes at a cost of speed. Second, the display format is simple that is in row and columns. Real life scenarios can be more demanding that&lt;br /&gt;&lt;br /&gt;With its templates, the Data List provides more control over the look and feel of the displayed data than the Data Grid. It offers better performance than data grid&lt;br /&gt;&lt;br /&gt;Repeater control allows for complete and total control. With the Repeater, the only HTML emitted are the values of the data binding statements in the templates along with the HTML markup specified in the templates—no "extra" HTML is emitted, as with the Data Grid and Data List. By requiring the developer to specify the complete generated HTML markup, the Repeater often requires the longest development time. However, repeater does not provide editing features like data grid so everything has to be coded by programmer. However, the Repeater does boast the best performance of the three data Web controls. Repeater is fastest followed by Datalist and finally data grid.&lt;br /&gt;&lt;br /&gt;See video on ASP.NET 4.0 web.config transformation as follows: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/43F_hpna5WY?hd=1" width="480"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Get more fundamentals stuffs on &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET/ASP.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;More from author’s blogs on &lt;a href="http://questpond.over-blog.com/article-net-asp-net-interview-questions-how-to-decide-on-the-design-consideration-to-take-a-data-grid-d-91969735.html" target="_blank"&gt;.NET/ASP.NET interview questions&lt;/a&gt; for interview references&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-1993537098041580105?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/1993537098041580105/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=1993537098041580105' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1993537098041580105'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1993537098041580105'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/12/netaspnet-interview-questions-while.html' title='.NET/ASP.NET interview questions: - While choosing design, when to consider Data grid, data list, or repeater?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/43F_hpna5WY/default.jpg' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.835877699999998 72.5617989 19.3160897 73.19351289999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-4644225232399268374</id><published>2011-12-05T02:50:00.001-08:00</published><updated>2011-12-05T05:01:23.034-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='authentication'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>ASP.NET interview questions: - Working of Forms authentication in ASP.NET</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Start answering this &lt;a href="http://www.questpond.com/" target="_blank"&gt;ASP.NET interview questions&lt;/a&gt; as follows: -&lt;br /&gt;&lt;br /&gt;In traditional ASP if you are told to create a login page and do authentication you have to do hell lot of custom coding. Now in ASP.NET that has made easy by introducing Forms authentication. So let us see in detail what form authentication is.&lt;br /&gt;&lt;br /&gt;Forms authentication uses a ticket cookie to see that user is authenticated or not. That means when user is authenticated first time a cookie is set to tell that this user is authenticated. If the cookies expire then Forms authentication mechanism sends the user to the login page. &lt;br /&gt;&lt;br /&gt;Following are the steps, which defines steps for Forms authentication:-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Configure Web.config file with forms authentication. As shown below in the config file you can see we have give the cookie name and loginurl page.&lt;/li&gt;&lt;/ul&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-hQpJAOojkhg/TtykVWFF2NI/AAAAAAAAD1M/XcknuxEDc20/s1600/a.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" dda="true" height="288" src="http://3.bp.blogspot.com/-hQpJAOojkhg/TtykVWFF2NI/AAAAAAAAD1M/XcknuxEDc20/s640/a.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;ul&gt;&lt;li&gt;Remove anonymous access to the IIS web application, following are changes done to web.config file.&lt;/li&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-ZfOLiVGYZak/TtykrYdIw_I/AAAAAAAAD1U/s-ZkwusvNgU/s1600/a1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" dda="true" height="264" src="http://3.bp.blogspot.com/-ZfOLiVGYZak/TtykrYdIw_I/AAAAAAAAD1U/s-ZkwusvNgU/s640/a1.jpg" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;li&gt;Create the login page, which will accept user information. You will have create your login page that is the Login.aspx, which will actually take the user data.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Finally a small coding in the login button.&lt;/li&gt;&lt;/ul&gt;Let us assume that the login page has two textboxes TX name and txtapssword.&lt;br /&gt;&lt;br /&gt;Also, import System.Web.Security and put the following code in login button of the page.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-HpXWrJsABO0/TtzAErOyKOI/AAAAAAAAD1c/QxlihFTUoso/s1600/a2.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="170" src="http://3.bp.blogspot.com/-HpXWrJsABO0/TtzAErOyKOI/AAAAAAAAD1c/QxlihFTUoso/s640/a2.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;See the following video on Single sign-on using forms authentication in ASP.NET as follows: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/RObndjW_RA0?hd=1" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Click and see more &lt;a href="http://www.questpond.com/" target="_blank"&gt;ASP.NET interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Also view author’s other blog on &lt;a href="http://dotnetinter.livejournal.com/51801.html" target="_blank"&gt;ASP.NET interview questions&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-4644225232399268374?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/4644225232399268374/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=4644225232399268374' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4644225232399268374'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4644225232399268374'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/12/aspnet-interview-questions-working-of.html' title='ASP.NET interview questions: - Working of Forms authentication in ASP.NET'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-hQpJAOojkhg/TtykVWFF2NI/AAAAAAAAD1M/XcknuxEDc20/s72-c/a.jpg' height='72' width='72'/><thr:total>1</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.835877699999998 72.5617989 19.3160897 73.19351289999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-336396002559221566</id><published>2011-12-03T03:12:00.000-08:00</published><updated>2011-12-03T03:12:41.687-08:00</updated><title type='text'>.NET Knowledge Session: - What is Encapsulation?</title><content type='html'>&lt;iframe width="560" height="315" src="http://www.youtube.com/embed/XaPxDGAdxlg" frameborder="0" allowfullscreen&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-336396002559221566?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/336396002559221566/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=336396002559221566' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/336396002559221566'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/336396002559221566'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/12/net-knowledge-session-what-is.html' title='.NET Knowledge Session: - What is Encapsulation?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/XaPxDGAdxlg/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5889539703114489538</id><published>2011-11-29T03:15:00.001-08:00</published><updated>2011-11-29T03:20:24.871-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ado.Net Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='optimistic locking'/><category scheme='http://www.blogger.com/atom/ns#' term='Ado.Net'/><title type='text'>ADO.NET interview questions: - Elaborate different implementing ways of optimistic locking in ADO.NET.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is one of the &lt;a href="http://www.questpond.com/" target="_blank"&gt;ADO.NET interview questions&lt;/a&gt; asked in the interview. Answer this question with the simple steps as follows.&lt;br /&gt;&lt;br /&gt;Ways to implement optimistic locking using ADO.NET: -&lt;br /&gt;&lt;ul&gt;&lt;li&gt;When we call “Update” method of Data Adapter it handles locking internally. If the Dataset values are not matching with current data in Database, it raises concurrency exception error. We can easily trap this error using Try. Catch block and raise appropriate error message to the user.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Define a Date time stamp field in the table. When actually you are firing the UPDATE SQL statements, compare the current timestamp with one existing in the database. Below is a sample SQL which checks for timestamp before updating and any mismatch in timestamp it will not update the records. This I the best practice used by industries for locking.&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;Update table1 set field1=@test where Last Timestamp=@Current Timestamp&lt;/pre&gt;&lt;ul&gt;&lt;li&gt; Check for original values stored in SQL SERVER and actual changed values. In stored procedure check before updating that the old data is same as the current Example in the below shown SQL before updating field1 we check that is the old field1 value same. If not then some one else has updated and necessary action has to be taken.&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;Update table1 set field1=@test where field1 = @oldfield1value&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;Locking can be handled at ADO.NET side or at SQL SERVER side i.e. in stored procedures: -&lt;br /&gt;&lt;br /&gt;Also see the following video on Table Scan And Unique key in SQL Server: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/aHl70XUuszk" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Please click here to see more &lt;a href="http://www.questpond.com/" target="_blank"&gt;ADO.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Visit Authors blog for more &lt;a href="http://questpond.tumblr.com/post/13496447283/ado-net-interview-questions-optimistic-locking-in" target="_blank"&gt;ADO.NET interview questions &lt;/a&gt;&lt;br /&gt;&lt;a href="http://questpond.tumblr.com/post/13496447283/ado-net-interview-questions-optimistic-locking-in" target="_blank"&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://questpond.tumblr.com/post/13496447283/ado-net-interview-questions-optimistic-locking-in" target="_blank"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5889539703114489538?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5889539703114489538/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5889539703114489538' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5889539703114489538'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5889539703114489538'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/11/adonet-interview-questions-elaborate.html' title='ADO.NET interview questions: - Elaborate different implementing ways of optimistic locking in ADO.NET.'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/aHl70XUuszk/default.jpg' height='72' width='72'/><thr:total>1</thr:total><georss:featurename>Mulund Colony, Mulund West, Mumbai, Maharashtra, India</georss:featurename><georss:point>19.1696581 72.9357215</georss:point><georss:box>19.1546601 72.9159805 19.184656099999998 72.9554625</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5064657079331641328</id><published>2011-11-25T01:15:00.001-08:00</published><updated>2011-11-25T01:20:36.398-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Structures'/><category scheme='http://www.blogger.com/atom/ns#' term='.net interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Classes'/><title type='text'>.NET interview questions: - Similarities and Differences between Classes and structures.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;One of the most likely &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt;asked in the interview, so you should include the following points in your answers.&lt;br /&gt;&lt;b&gt;Similarities between classes and structures: -&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Both can have constructors, methods, properties, fields, constants, enumerations, events, and event handlers.&lt;/li&gt;&lt;li&gt;Structures and classes can implement interface.&lt;/li&gt;&lt;li&gt;Both of them can have constructors with and without parameter.&lt;/li&gt;&lt;/ul&gt;Both can have delegates and events.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Key differences are: -&lt;/b&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Structures are value types and classes are reference types. So structures use stack and classes use heap.&lt;/li&gt;&lt;li&gt;Structures members cannot be declared as protected, but class members can be. You cannot do inheritance in structures.&lt;/li&gt;&lt;li&gt;Structures do not require constructors while classes require.&lt;/li&gt;&lt;li&gt;Objects created from classes are terminated using Garbage collector. Structures are not destroyed using GC.&lt;/li&gt;&lt;/ul&gt;Following you can see video on regular expressions with some practical demonstrations: -&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/C2zm0roE-Uc?hd=1" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Please click here to see more &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Visit Authors blog for more &lt;a href="http://dotnetinter.livejournal.com/51239.html" target="_blank"&gt;.NET interview questions&lt;/a&gt;&lt;/div&gt;&lt;a href="http://dotnetinter.livejournal.com/51239.html" target="_blank"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5064657079331641328?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5064657079331641328/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5064657079331641328' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5064657079331641328'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5064657079331641328'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/11/net-interview-questions-similarities.html' title='.NET interview questions: - Similarities and Differences between Classes and structures.'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/C2zm0roE-Uc/default.jpg' height='72' width='72'/><thr:total>1</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0759837 72.8776559</georss:point><georss:box>18.835877699999998 72.5617989 19.3160897 73.19351289999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-4176946366320963826</id><published>2011-11-19T03:32:00.001-08:00</published><updated>2011-11-19T03:49:24.337-08:00</updated><title type='text'>.Net Interview questions: - What is GAC, add/remove an assembly from GAC and how do we make choices between 2 versions of the same assembly?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt; will make you remember the basics of .NET if you are senior person in the .NET industry. For the fresher it is still a hiccup so one can start answering the same as follows: - &lt;br /&gt;&lt;br /&gt;&lt;b&gt;About GAC: -&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;GAC (Global Assembly Cache) is where all shared .NET assembly resides. GAC is used in the following situations: -&lt;br /&gt;&lt;ul&gt;&lt;li&gt;If the application has to be shared among several application which is in the same computer.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;If the assembly has some special security, requirements like only administrators can remove the assembly. If the assembly is private then a simple delete of assembly the assembly file will remove the assembly.&lt;/li&gt;&lt;/ul&gt;&lt;b&gt;Add/remove an assembly from GAC: -&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;You can use the ‘GACUTIL’ tool which comes with visual studio. So to register an assembly in to GAC go to “Visual Studio Command Prompt” and type “gacutil –i (assembly name)”, where (assembly name) is the DLL name of the project.&lt;br /&gt;&lt;br /&gt;One you have installed the assembly the DLL can be seen in ‘c:\windows\assembly\’ folder.&lt;br /&gt;&lt;br /&gt;When we have many DLL’s to be deployed we need to create setup and deployment package using windows installer. So the common way of deploying GAC DLL in production is by using windows installer.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Making choice between two versions of the same assembly in GAC: -&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;When we have two version of the same assembly in GAC we need to use binding redirect  tag and specify the version we want to use in the new version property as shown in the below “app.config” file.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-Zko9KCxHw7o/TseVl4kA42I/AAAAAAAAD1E/L0UWg5I7fgY/s800/ajay.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get ready to see more basics videos of &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt;on Garbage Collector, Gen 0, 1 &amp;amp; 2 as follows: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/gC8NdlOeNEs" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Get more fundamentals stuffs on &lt;a href="http://www.questpond.com/" target="_blank"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;More from author’s blogs on &lt;a href="http://dotnetinter.livejournal.com/51049.html" target="_blank"&gt;.NET interview questions&lt;/a&gt; for interview references.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-4176946366320963826?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/4176946366320963826/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=4176946366320963826' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4176946366320963826'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4176946366320963826'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/11/net-interview-questions-what-is-gac.html' title='.Net Interview questions: - What is GAC, add/remove an assembly from GAC and how do we make choices between 2 versions of the same assembly?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-Zko9KCxHw7o/TseVl4kA42I/AAAAAAAAD1E/L0UWg5I7fgY/s72-c/ajay.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-1004892914179934788</id><published>2011-11-16T07:19:00.001-08:00</published><updated>2011-11-16T07:24:33.907-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='REST'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='bindings'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>WCF interview questions: - Using which binding we can build WCF REST?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is one of the asked &lt;a href="http://www.questpond.com/" target="_blank"&gt;WCF interview questions&lt;/a&gt; during the interview. So one proceed answer as the following: -&lt;br /&gt;&lt;br /&gt;For WCF REST we need to use WebHttpBinding. WebhttpBinding is enabled by as shown in the below code snippet.&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-HpZmCpuR0Jo/TsPTUCA8XBI/AAAAAAAAD08/67iRMTZR0RM/s1600/1.jpg" /&gt;&lt;span class="Apple-style-span" style="color: blue;"&gt;&lt;br /&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;Also see our following video on explanation of REST: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/YXIee3pcG7E" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Click and get to see more on&amp;nbsp;&lt;a href="http://www.questpond.com/" target="_blank"&gt;WCF Interview questions&lt;/a&gt; series.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Also visit author’s blog for more &lt;a href="http://www.dotnetinterviewquestions.in/article_wcf-interview-questions:-which-binding-do-we-need-to-use-for-wcf-rest_73.html" target="_blank"&gt;WCF interview questions&lt;/a&gt; &lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-1004892914179934788?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/1004892914179934788/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=1004892914179934788' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1004892914179934788'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1004892914179934788'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/11/wcf-interview-questions-using-which.html' title='WCF interview questions: - Using which binding we can build WCF REST?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-HpZmCpuR0Jo/TsPTUCA8XBI/AAAAAAAAD08/67iRMTZR0RM/s72-c/1.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5191225147029259823</id><published>2011-11-12T07:18:00.001-08:00</published><updated>2011-11-12T07:46:40.027-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Server Interview Question - How do we connect to SQL SERVER, which namespace do we use?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt; is more of practical oriented. Below is the code to connect SQL Server, then we will try to understand the same in a more detailed manner.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Private Sub LoadData()&lt;br /&gt;‘ note :- with and end with makes your code more readable&lt;br /&gt;Dim strConnectionString As String&lt;br /&gt;Dim objConnection As New SqlConnection&lt;br /&gt;Dim objCommand As New SqlCommand&lt;br /&gt;Dim objReader As SqlDataReader&lt;br /&gt;Try&lt;br /&gt;‘ this gets the connectionstring from the app.config file.&lt;br /&gt;‘ note if this gives error see where the MDB file is stored &lt;br /&gt;  in your pc and point to thastrConnectionString = AppSettings.Item&lt;br /&gt;(“ConnectionString”)&lt;br /&gt;‘ take the connectiostring and initialize the connection object&lt;br /&gt;With objConnection&lt;br /&gt;.ConnectionString = strConnectionString&lt;br /&gt;.Open()&lt;br /&gt;End With&lt;br /&gt;objCommand = New SqlCommand(“Select FirstName from Employees”)&lt;br /&gt;With objCommand&lt;br /&gt;.Connection = objConnection&lt;br /&gt;objReader = .ExecuteReader()&lt;br /&gt;End With&lt;br /&gt;‘ looping through the reader to fill the list box&lt;br /&gt;Do While objReader.Read()&lt;br /&gt;lstData.Items.Add(objReader.Item(“FirstName”))&lt;br /&gt;Loop&lt;br /&gt;Catch ex As Exception&lt;br /&gt;Throw ex&lt;br /&gt;Finally&lt;br /&gt;objConnection.Close()&lt;br /&gt;End Try&lt;br /&gt;&amp;lt;appSettings&amp;gt;&lt;br /&gt;&amp;lt;add key=”Connectionstring” value=”Server=ERMBOM1-IT2;User ID=sa;Database=Employees”/&amp;gt;&lt;br /&gt;&amp;lt;/appSettings&amp;gt;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;Note:- Comments in the code do explain a lot but we will again iterate through the &lt;br /&gt;whole code later. “LoadData” is the main method which loads the data from SQL SERVER. &lt;br /&gt;Before running this code you have to install SQL SERVER in your machine. As we are dealing &lt;br /&gt;with SQLCLIENT we need to setup database in SQL SERVER. Depending on computer you will &lt;br /&gt;also have to change the connectionstring in Web.config file.&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;For setting up the sample SQL table, we can use the DTS import wizard to import the table. See the below figure which is using data source as Microsoft Access. While importing the database author had, give the database name as “Employees”.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-CVDO1bvSk-I/Tr6OaFPKkFI/AAAAAAAAD0c/SpCbUHArge8/s1600/1.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="255" src="http://3.bp.blogspot.com/-CVDO1bvSk-I/Tr6OaFPKkFI/AAAAAAAAD0c/SpCbUHArge8/s320/1.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-gXb-wf8tyjM/Tr6OfDe_28I/AAAAAAAAD0k/XlZQXu_L8SE/s1600/2.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;/div&gt;Figure: - Loading “Nwind.mdb” in SQL SERVER&lt;br /&gt;&amp;nbsp; &lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-gXb-wf8tyjM/Tr6OfDe_28I/AAAAAAAAD0k/XlZQXu_L8SE/s1600/2.JPG" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="258" src="http://1.bp.blogspot.com/-gXb-wf8tyjM/Tr6OfDe_28I/AAAAAAAAD0k/XlZQXu_L8SE/s320/2.JPG" width="320" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Figure: - Load only the Employee table.&lt;br /&gt;&lt;br /&gt;To make it simple we will only import the employee table as that is the only thing needed in our sample code.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&amp;nbsp;&lt;a href="http://4.bp.blogspot.com/--1uFtTP5YN8/Tr6Ofp3uNtI/AAAAAAAAD0o/MKnkVc-fnXs/s1600/3.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="209" src="http://4.bp.blogspot.com/--1uFtTP5YN8/Tr6Ofp3uNtI/AAAAAAAAD0o/MKnkVc-fnXs/s320/3.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Figure: - View of loaded Employee table&lt;br /&gt;&lt;br /&gt;Now from interview point of view definitely you are not going to say the whole source code, which is given in the book. Interviewer expects only the broader answer of what are the steps needed to connect to SQL SERVER. For fundamental sake author has explained the whole source code. In short, you have to explain the “Load Data” method in broader way. Following are the steps to connect to SQL SERVER:-&lt;br /&gt;&lt;br /&gt;• First imports the namespace “System.Data.SqlClient”.&lt;br /&gt;• Create a connection object as shown in “Load Data” method.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;With objConnection&lt;br /&gt;.Connection String = strConnectionString&lt;br /&gt;.Open ()&lt;br /&gt;End With&lt;br /&gt;&lt;/pre&gt;• Create the command object with the SQL. Also, assign the created connection object to command object and execute the reader.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;ObjCommand = New SqlCommand (“Select First Name from Employees”)&lt;br /&gt;With objCommand&lt;br /&gt;.Connection = objConnection&lt;br /&gt;Breeder = .Execute Reader ()&lt;br /&gt;End With&lt;br /&gt;&lt;/pre&gt;• Finally loop through the reader and fill the list box. If old VB programmers are expecting the move next command it is replaced by Read () which returns true if there is any data to be read. If the .Read () return is false that means that it’s end of data reader and there is no more data to be read.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Do while objReader.Read ()&lt;br /&gt;lstData.Items.Add (objReader.Item (“First Name”))&lt;br /&gt;Loop&lt;br /&gt;&lt;/pre&gt;• Do not forget to close the connection object.&lt;br /&gt;&lt;br /&gt;See the following video on use of SQL Server in SharePoint and use of virtual path provider&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-oqe49qwUBwA/Tr6OgDkHNwI/AAAAAAAAD00/JDVcn2lJq4g/s1600/4.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="200" src="http://1.bp.blogspot.com/-oqe49qwUBwA/Tr6OgDkHNwI/AAAAAAAAD00/JDVcn2lJq4g/s320/4.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/embed/9_0_msthzeM" target="_blank"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;More stuffs on &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt; for interview preparation.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Go to author’s blog for typical other&amp;nbsp;&lt;a href="http://questpond.blog.com/2011/11/12/sql-server-interview-question-connect-sql-server-which-namespace-do-we-use/" target="_blank"&gt;SQL Server interview questions &lt;/a&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5191225147029259823?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5191225147029259823/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5191225147029259823' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5191225147029259823'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5191225147029259823'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/11/sql-server-interview-question-how-do-we.html' title='SQL Server Interview Question - How do we connect to SQL SERVER, which namespace do we use?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-CVDO1bvSk-I/Tr6OaFPKkFI/AAAAAAAAD0c/SpCbUHArge8/s72-c/1.JPG' height='72' width='72'/><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-8502339571731892747</id><published>2011-11-10T07:56:00.001-08:00</published><updated>2011-11-10T08:11:40.815-08:00</updated><title type='text'>ADO.NET interview questions: - What are the namespaces provided by .NET for data management?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;br /&gt;Following are the namespaces provided by .NET for data management:-&lt;br /&gt;&lt;b&gt;System.Data&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This namespace has the dataset object which helps us to access data in a data source independent manner.&lt;br /&gt;&lt;b&gt;System.Data.SqlClient:&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This namespace has objects which helps us to connect to SQL Server database.&lt;br /&gt;&lt;b&gt;System.Data.OleDB&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This namespace has objects which helps us to connect to other databases like Oracle, Access and also SQL Server database.&lt;br /&gt;&lt;b&gt;System.XML&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;This Contains the basic objects required to create, read, store, write, and manipulate XML documents.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-U7ryNWrNRmc/Trvz91XSLUI/AAAAAAAAD0M/Wox-buGbJig/s1600/1.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="194" src="http://3.bp.blogspot.com/-U7ryNWrNRmc/Trvz91XSLUI/AAAAAAAAD0M/Wox-buGbJig/s320/1.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;ADO.NET namespaces&lt;br /&gt;&lt;br /&gt;See the following video on calling a stored procedure using LINQ: -&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-RiQTZBAoVys/Trvz-VrqrlI/AAAAAAAAD0U/FDWnqCthpDc/s1600/2.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="202" src="http://1.bp.blogspot.com/-RiQTZBAoVys/Trvz-VrqrlI/AAAAAAAAD0U/FDWnqCthpDc/s320/2.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.youtube.com/embed/rL4tqiaDwmM" target="_blank"&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Avail from the link more &lt;a href="http://www.questpond.com/" target="_blank"&gt;ADO.NET interview questions&lt;/a&gt; for preparation.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Refer author’s other blog for complete&lt;a href="http://dotnetinterviewquestion.wordpress.com/2011/11/10/ado-net-interview-questions-state-different-namespaces-provided-by-net-for-data-management/" target="_blank"&gt;ADO.NET interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-8502339571731892747?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/8502339571731892747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=8502339571731892747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8502339571731892747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8502339571731892747'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/11/adonet-interview-questions-what-are.html' title='ADO.NET interview questions: - What are the namespaces provided by .NET for data management?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-U7ryNWrNRmc/Trvz91XSLUI/AAAAAAAAD0M/Wox-buGbJig/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5743598292011029156</id><published>2011-11-08T22:52:00.000-08:00</published><updated>2011-11-08T22:52:55.494-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dataset'/><category scheme='http://www.blogger.com/atom/ns#' term='Ado.Net Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Question'/><category scheme='http://www.blogger.com/atom/ns#' term='Ado.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Datareader'/><category scheme='http://www.blogger.com/atom/ns#' term='Dataadapter'/><title type='text'>ADO.NET interview questions: - Different components in ADO.NET.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;There are 6 important components in ADO.NET:-&lt;br /&gt;&lt;ul&gt;&lt;li&gt;Connection: -This object creates a connection to the database.  If you want to do any operation on the database you have to first create a connection object.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Command: -This object helps us to execute SQL queries against database. Using command object we can execute select, insert, update and delete SQL command.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Data reader: - This provides a recordset which can be browsed only in forward direction. It can only be read but not updated. Data reader is good for large number of records where you want to just browse quickly and display it.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Dataset object: -This provides a recordset which can be read back and in forward direction. The recordset can also be updated. Dataset is like a in memory database with tables, rows and fields.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Data Adapter: -This object acts as a bridge between database and dataset; it helps to load the dataset object.&lt;/li&gt;&lt;/ul&gt;&lt;ul&gt;&lt;li&gt;Data View: - This object is used to sort and filter data in Data table of dataset.&lt;/li&gt;&lt;/ul&gt;&lt;img src="http://1.bp.blogspot.com/-nmbOjuMZxIQ/TrogkpuzNRI/AAAAAAAADy8/u4rkTrxeOOc/s600/1.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;b&gt;Figure: - ADO.NET architecture&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;See the following video on Table Scan and Unique key in SQL Server: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/aHl70XUuszk" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Get more on &lt;a href="http://www.questpond.com/"&gt;ADO.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;For more on &lt;a href="http://questpond.over-blog.com/article-ado-net-interview-questions-what-are-the-different-components-in-ado-net-88338805.html"&gt;ADO.NET interview questions&lt;/a&gt; from author’s blog.&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5743598292011029156?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5743598292011029156/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5743598292011029156' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5743598292011029156'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5743598292011029156'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/11/adonet-interview-questions-different.html' title='ADO.NET interview questions: - Different components in ADO.NET.'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-nmbOjuMZxIQ/TrogkpuzNRI/AAAAAAAADy8/u4rkTrxeOOc/s72-c/1.jpg' height='72' width='72'/><thr:total>1</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0176147 72.8561644</georss:point><georss:box>18.7774257 72.5403074 19.2578037 73.17202139999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5709078177497967948</id><published>2011-11-06T19:32:00.000-08:00</published><updated>2011-11-06T20:00:38.836-08:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Server interview questions - What is meant by Referential Integrity in SQL Server?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-PaoT7nfG4JM/TrdPPLScypI/AAAAAAAADyM/PhGGxFdC-jc/s1600/1.JPG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;This is one the typical&lt;a href="http://www.questpond.com/demo.html" target="_blank"&gt;SQL interview questions&lt;/a&gt; and also the favorable question of the &lt;b&gt;interviewers&lt;/b&gt;, which has been asked in most of the .NET interviews.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Referential Integrity&lt;/b&gt;: - Referential Integrity is a &lt;b&gt;DataBase&lt;/b&gt; concept that &lt;b&gt;ensures&lt;/b&gt; the &lt;b&gt;relationship&lt;/b&gt; between &lt;b&gt;tables remains&lt;/b&gt;&lt;b&gt;consistent&lt;/b&gt;, where &lt;b&gt;one table&lt;/b&gt; has a &lt;b&gt;&lt;span style="color: red;"&gt;foreign key reference&lt;/span&gt;&lt;/b&gt; to the &lt;b&gt;other table&lt;/b&gt; which is &lt;b&gt;declared&lt;/b&gt; as&lt;span style="color: red;"&gt;&lt;b&gt;primary key. &lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;In simply words when a relation is &lt;b&gt;maintained&lt;/b&gt; between &lt;b&gt;two table’s&lt;/b&gt; using &lt;b&gt;primary key&lt;/b&gt; and &lt;b&gt;foreign key&lt;/b&gt; &lt;b&gt;reference&lt;/b&gt; is called as &lt;b&gt;Referential Integrity.&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Let’s see a simple demonstration to understand the concept of Referential Integrity.&lt;br /&gt;&lt;br /&gt;In order see it practically you just need to follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1&lt;/b&gt;: - Let’s first create &lt;b&gt;Two Tables&lt;/b&gt; like below diagram with &lt;b&gt;respective relationship.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;1. Creating a Customer Table.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Query&lt;/b&gt;: -&lt;br /&gt;&lt;pre&gt;create table Customer&lt;br /&gt;(&lt;br /&gt;CustID int primary key,&lt;br /&gt;CustomerName varchar(50)&lt;br /&gt;);&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-PaoT7nfG4JM/TrdPPLScypI/AAAAAAAADyM/PhGGxFdC-jc/s1600/1.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="127" src="http://3.bp.blogspot.com/-PaoT7nfG4JM/TrdPPLScypI/AAAAAAAADyM/PhGGxFdC-jc/s320/1.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the above table of customer you can see that I have created two columns with one as &lt;b&gt;primary key.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;2&lt;/b&gt;. Similarly, let’s create second table name as &lt;b&gt;CustomerDetails.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Query&lt;/b&gt;: -&lt;br /&gt;&lt;pre&gt;create table CustomerDetails &lt;br /&gt;(CustID int Foreign key references Customer(CustID),&lt;br /&gt;CustDetailsID int primary key,&lt;br /&gt;CustOrders varchar(50)&lt;br /&gt;);&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-E96mbS1Cpvg/TrdPPmnhM9I/AAAAAAAADyQ/WFIf17T7Y74/s1600/2.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="152" src="http://3.bp.blogspot.com/-E96mbS1Cpvg/TrdPPmnhM9I/AAAAAAAADyQ/WFIf17T7Y74/s320/2.JPG" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the above table of &lt;b&gt;CustomerDetails&lt;/b&gt; you can see that I have declared&lt;b&gt;CustID&lt;/b&gt; as &lt;b&gt;foreign key references&lt;/b&gt; to the &lt;b&gt;Customer&lt;/b&gt; &lt;b&gt;(CustId) table.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step2&lt;/b&gt;: - Now, let’s Insert some data to both the table’s.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Query: - Inserting into Customer Table.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;insert into dbo.Customer(CustID,CustomerName)values(1,'Kalim')&lt;br /&gt;insert into dbo.Customer(CustID,CustomerName)values(2,'Wasim')&lt;br /&gt;insert into dbo.Customer(CustID,CustomerName)values(3,'Salim')&lt;br /&gt;insert into dbo.Customer(CustID,CustomerName)values(4,'Nadeem')&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-7psg4YXyxF0/TrdPP2ZgIiI/AAAAAAAADyY/btdo171KaPI/s1600/3.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-7psg4YXyxF0/TrdPP2ZgIiI/AAAAAAAADyY/btdo171KaPI/s1600/3.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Query: - Inerting into CustomerDetails Table.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;insert into dbo.CustomerDetails(CustID ,CustDetailsID ,CustOrders ) &lt;br /&gt;values(1,1,'Pizza')&lt;br /&gt;insert into dbo.CustomerDetails(CustID ,CustDetailsID ,CustOrders ) &lt;br /&gt;values(1,2,'Pepsi')&lt;br /&gt;insert into dbo.CustomerDetails(CustID ,CustDetailsID ,CustOrders ) &lt;br /&gt;values(3,3,'Veg-Roll')&lt;br /&gt;insert into dbo.CustomerDetails(CustID ,CustDetailsID ,CustOrders ) &lt;br /&gt;values(2,4,'Chicken-Pizza')&lt;/pre&gt;&lt;pre&gt;&amp;nbsp;&lt;/pre&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-dtAbVIS9ORE/TrdPQt8pdTI/AAAAAAAADyg/alh3LRMC4_U/s1600/4.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-dtAbVIS9ORE/TrdPQt8pdTI/AAAAAAAADyg/alh3LRMC4_U/s1600/4.JPG" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note&lt;/b&gt;: - When there is Referential Integrity between two table’s then you cannot delete record from the respective table.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step3&lt;/b&gt;: - Let’s see a example to prove the above mentioned note.&lt;br /&gt;&lt;br /&gt;So, let’s try to &lt;b&gt;delete record&lt;/b&gt; from the &lt;b&gt;Customer&lt;/b&gt; table and see what is the output.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Query&lt;/b&gt;: - &lt;br /&gt;&lt;pre&gt;delete from Customer where CustID = 1&lt;/pre&gt;As soon as you &lt;b&gt;click&lt;/b&gt; on &lt;b&gt;execute&lt;/b&gt; you will o&lt;b&gt;utput result like below diagram.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-GWkiA7-Vo8c/TrdPRqopqFI/AAAAAAAADys/5DG4WZXekR4/s1600/5.JPG" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="62" src="http://4.bp.blogspot.com/-GWkiA7-Vo8c/TrdPRqopqFI/AAAAAAAADys/5DG4WZXekR4/s400/5.JPG" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the above output result diagram you can clearly see that the &lt;b&gt;compiler&lt;/b&gt; does not allow &lt;b&gt;deleting record&lt;/b&gt; from the &lt;b&gt;table&lt;/b&gt;. Which means that, when there is relation maintains between two table’s using Referential &lt;b&gt;Integrity&lt;/b&gt; you cannot delete records from the &lt;b&gt;respective tables.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;See the following video on the differences between unique key and primary key as follows: -&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.youtube.com/embed/8iIvyNPwruU?hd=1" target="_blank"&gt;&lt;img border="0" height="310" src="http://4.bp.blogspot.com/-C8MA9fhc2p0/TrdPTJKoWdI/AAAAAAAADyw/5Q9odIModKo/s320/6.JPG" width="465" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get more on &lt;a href="http://www.questpond.com/" target="_blank"&gt;SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;See for author’s other blog on&lt;a href="http://www.dotnetinterviewquestions.in/article_sql-server-interview-questions-can-you-explain-referential-integrity-in-sql-server_69.html" target="_blank"&gt;SQL Server interview questions &lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5709078177497967948?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5709078177497967948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5709078177497967948' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5709078177497967948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5709078177497967948'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/11/sql-server-interview-questions-what-is.html' title='SQL Server interview questions - What is meant by Referential Integrity in SQL Server?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-PaoT7nfG4JM/TrdPPLScypI/AAAAAAAADyM/PhGGxFdC-jc/s72-c/1.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-1479572868740913048</id><published>2011-11-04T06:13:00.000-07:00</published><updated>2011-11-04T06:13:02.633-07:00</updated><title type='text'>.NET interview questions: – CAS model under .NET 4.0</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;Under .NET 4.0 for CAS there are two major changes are brought in: -&amp;nbsp;•&lt;br /&gt;&lt;br /&gt;Permission granting is no more the work of CAS; it’s now the work of the hosting model. In other words CAS is disabled in .NET 4.0 by default. The host will decide what rights to be given to the .NET assembly.&lt;br /&gt;&lt;br /&gt;A new security model i.e. Security transparent model is introduced. The security transparent model puts code in to separate compartments/ boxes as per the risk associated. If you know a code can do something wrong you can compartmentalizethe code as ‘Security transparent’ and if you have a code which you trust you can box them in to ‘Security critical’.&lt;br /&gt;&lt;br /&gt;CAS Model: -&lt;br /&gt;&lt;br /&gt;Security transparent code is the code which you feel is unsafe and security safe critical code is the code which you feel is safe and has full access to the system. Security transparent code cannot call critical code directly, if they have to then they need to go through security safe critical code.&lt;br /&gt;&lt;br /&gt;&lt;div style="text-align: center;"&gt;&lt;img src="http://3.bp.blogspot.com/-hoVVRcSgfto/TrPUXBkte8I/AAAAAAAADyE/AJFFicIR33Q/s640/1.jpg" /&gt;Figure: - .NET 4.0 CAS model&amp;nbsp;&lt;/div&gt;&lt;br /&gt;Also see as detailed video on CAS which explains evidence, permission set &amp;amp; code groups as follows:&lt;br /&gt;&lt;br /&gt;&amp;nbsp;&lt;a href="http://www.youtube.com/embed/qNnOi5xi9KM?hd=1" target="_blank"&gt;&lt;img alt="" border="0" height="301" src="http://questpond.blog.com/files/2011/11/2.jpg" width="470" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Get more for&lt;a href="http://www.questpond.com/"&gt; .NET interview questions&lt;/a&gt; for complete preparation.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Refer author’s other blog for complete &lt;a href="http://dotnetinter.livejournal.com/49569.html"&gt;.NET interview questions&lt;/a&gt; .&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-1479572868740913048?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/1479572868740913048/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=1479572868740913048' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1479572868740913048'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1479572868740913048'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/11/net-interview-questions-cas-model-under.html' title='.NET interview questions: – CAS model under .NET 4.0'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-hoVVRcSgfto/TrPUXBkte8I/AAAAAAAADyE/AJFFicIR33Q/s72-c/1.jpg' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-9045180594642902600</id><published>2011-10-31T03:26:00.000-07:00</published><updated>2011-10-31T03:26:55.585-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Threading'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Question'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Data'/><title type='text'>.NET interview questions: - Parse data in Threading.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is a semi-asked &lt;a href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt; and has been asked in most of the interviews to check your skills on &lt;b&gt;parsing data&lt;/b&gt; in &lt;b&gt;threading.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;As a senior developer you would be interested to know how exactly we can parse data in threading.&lt;br /&gt;Below is the code snippet for simple use of threading: -&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;    class Program&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            Thread objThread = new Thread(CallMe);&lt;br /&gt;            objThread.Start();&lt;br /&gt;        }&lt;br /&gt;        public static void CallMe()&lt;br /&gt;        {&lt;br /&gt;            for (int i = 0; i &amp;lt;= 5; i++)&lt;br /&gt;            {&lt;br /&gt;                Console.WriteLine("Threading.......");&lt;br /&gt;                Thread.Sleep(2000);&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;In the above code snippet you can see that I have created a “CallMe” function which has a for loop and getting executed till the value of “i” is 5 and simply print a line of text to the output screen after every 2 seconds using Thread.Sleep(2000);.&lt;br /&gt;&lt;br /&gt;Now, when you execute this above code snippet you will see result like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-PLtdqjVXiTs/Tq5zUaySu9I/AAAAAAAADxI/s9zih1Q9qNY/s1600/Untitled.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="126" src="http://2.bp.blogspot.com/-PLtdqjVXiTs/Tq5zUaySu9I/AAAAAAAADxI/s9zih1Q9qNY/s320/Untitled.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The above code snippet seems to be works fine but what if there is a situation that you want to execute for loop according to the data passed by the &lt;b&gt;Thread.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;The data can be parsed in threading by the following two ways&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1.&lt;/b&gt; You can parse the value by defining&lt;b&gt; object &lt;/b&gt;variable.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-LVzucnSQ9aY/Tq5zd6dqa8I/AAAAAAAADxQ/3KM21HWydW8/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="86" src="http://2.bp.blogspot.com/-LVzucnSQ9aY/Tq5zd6dqa8I/AAAAAAAADxQ/3KM21HWydW8/s320/2.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;2. &lt;/b&gt;You can use &lt;b&gt;Lambda Expression.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;So, let’s take the above point’s one by one try to understand it in better manner.&lt;br /&gt;&lt;br /&gt;In order to see it practically you just need to follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1: -&lt;/b&gt; Create a simple Console Application for that just open &lt;b&gt;Visual Studio &amp;gt;&amp;gt; go to &amp;gt;&amp;gt; File &amp;gt;&amp;gt; New &amp;gt;&amp;gt; Project &amp;gt;&amp;gt; Windows &amp;gt;&amp;gt; Select Console Application.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-xJCN2SCl9Es/Tq5zps8LADI/AAAAAAAADxY/zqc9rdjTNpw/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="80" src="http://1.bp.blogspot.com/-xJCN2SCl9Es/Tq5zps8LADI/AAAAAAAADxY/zqc9rdjTNpw/s320/3.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-DBRSmiZdAEY/Tq5zxVkTyKI/AAAAAAAADxg/iUdTpYYf3-4/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="37" src="http://2.bp.blogspot.com/-DBRSmiZdAEY/Tq5zxVkTyKI/AAAAAAAADxg/iUdTpYYf3-4/s320/4.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;b&gt;Step2: -&lt;/b&gt; let us first prove the point of passing the data using &lt;b&gt;object&lt;/b&gt; variables.&lt;br /&gt;&lt;br /&gt;Now, simply just add the&lt;b&gt; below code snippet &lt;/b&gt;in to &lt;b&gt;program&lt;/b&gt;.cs file of your &lt;b&gt;Console Application.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;    class Program&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            Thread objThread = new Thread(CallMe);&lt;br /&gt;            //Passing the value 5.&lt;br /&gt;            objThread.Start(5);&lt;br /&gt;        }&lt;br /&gt;        //Created a CallMe function with a Object parameter "k".&lt;br /&gt;        public static void CallMe(object k)&lt;br /&gt;        {&lt;br /&gt;            //creted a int type variable and type caste it.&lt;br /&gt;            int j = (int)k;&lt;br /&gt;            for (int i = 0; i &amp;lt;= j; i++)&lt;br /&gt;            {&lt;br /&gt;                Console.WriteLine("Threading.......");&lt;br /&gt;                Thread.Sleep(2000);&lt;br /&gt;            }&lt;br /&gt;            Console.ReadLine();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;Now, just simply execute your console application and will see result like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-h2ADa4_Kxnw/Tq5z_iopBNI/AAAAAAAADxo/G3VDHqGJXFA/s1600/5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="126" src="http://4.bp.blogspot.com/-h2ADa4_Kxnw/Tq5z_iopBNI/AAAAAAAADxo/G3VDHqGJXFA/s320/5.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;This is how you can parse the data using&lt;b&gt; Object Variables.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Step3: -&lt;/b&gt; similarly, let’s take the second point of parsing the data using &lt;b&gt;Lambda Expression.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Now, simply just change your &lt;b&gt;program.cs&lt;/b&gt; file &lt;b&gt;code snippet&lt;/b&gt; like below code snippet.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;    class Program&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;       //Created a Lambda Expression and parse the value as 7.&lt;br /&gt;           Thread objThread = new Thread(() =&amp;gt; CallMe(7));&lt;br /&gt;            objThread.Start();&lt;br /&gt;        }&lt;br /&gt;     //Created a CallMe function with a int parameter "k".&lt;br /&gt;        public static void CallMe(int k)&lt;br /&gt;        {&lt;br /&gt;     //Created a int type variable which hold the value of k.&lt;br /&gt;            int j = k;&lt;br /&gt;            for (int i = 0; i &amp;lt; j; i++)&lt;br /&gt;            {&lt;br /&gt;                Console.WriteLine("Threading.......");&lt;br /&gt;                Thread.Sleep(2000);&lt;br /&gt;            }&lt;br /&gt;            Console.ReadLine();&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;In the below diagram you can see that how I have used the &lt;b&gt;Lambda Expression&lt;/b&gt; in order to &lt;b&gt;parse&lt;/b&gt; the data in &lt;b&gt;Threading.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-eadiUOVHdJM/Tq50MsBZ6PI/AAAAAAAADxw/UL5SEGgTm0k/s1600/6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="118" src="http://2.bp.blogspot.com/-eadiUOVHdJM/Tq50MsBZ6PI/AAAAAAAADxw/UL5SEGgTm0k/s320/6.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;Now, when you run your Console Application you will see the result like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-k2xOR8USh0Y/Tq50TyyW_GI/AAAAAAAADx4/5AMh_Rqmwzo/s1600/7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="128" src="http://2.bp.blogspot.com/-k2xOR8USh0Y/Tq50TyyW_GI/AAAAAAAADx4/5AMh_Rqmwzo/s320/7.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;View the following video on thread, background thread and foreground thread in .NET: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/Fzckqczmgd0?hd=1" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Click for more &lt;a href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Regards,&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Visit for more author’s blog on &lt;a href="http://www.dotnetinterviewquestions.in/article_net-interview-questions:-how-to-parse-data-in-threading_66.html"&gt;.NET interview questions&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_net-interview-questions:-how-to-parse-data-in-threading_66.html"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-9045180594642902600?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/9045180594642902600/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=9045180594642902600' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/9045180594642902600'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/9045180594642902600'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/net-interview-questions-parse-data-in.html' title='.NET interview questions: - Parse data in Threading.'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-PLtdqjVXiTs/Tq5zUaySu9I/AAAAAAAADxI/s9zih1Q9qNY/s72-c/Untitled.jpg' height='72' width='72'/><thr:total>0</thr:total><georss:featurename>Mumbai, Maharashtra, India</georss:featurename><georss:point>19.0176147 72.8561644</georss:point><georss:box>18.7774257 72.5403074 19.2578037 73.17202139999999</georss:box></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-1366463363018842534</id><published>2011-10-28T05:13:00.000-07:00</published><updated>2011-10-28T05:19:16.603-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='unique'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='code'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>ASP.NET interview questions: - Unique Code in ASP.NET.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is one of the requirements that would come across you many a times while working on .NET projects. Some of the senior developers will find this question very easy but many of the developer friends find it difficult to answer the above question.&lt;br /&gt;&lt;br /&gt;So we have tried to give an answer for this&lt;a href="http://www.questpond.com/"&gt; ASP. NET interview questions&lt;/a&gt; in the practical form as follows&lt;b&gt;: -&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;So take a small example to see how exactly we can create a &lt;b&gt;Unique Code like C001, C002……., C00n.&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;In order to see it practically you just need to follow the following steps: -&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Step1: - Create an ASP.NET Web Application for that just open Visual Studio &amp;gt;&amp;gt; go to &amp;gt;&amp;gt;File &amp;gt;&amp;gt; New &amp;gt;&amp;gt; Project &amp;gt;&amp;gt; Web&amp;gt;&amp;gt; Select ASP.NET Empty Web Application.&amp;nbsp;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;b&gt;&lt;a href="http://4.bp.blogspot.com/-Ez_Lc__KdjM/TqqQp564fKI/AAAAAAAADwA/oD8Nf3jFZd4/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="70" src="http://4.bp.blogspot.com/-Ez_Lc__KdjM/TqqQp564fKI/AAAAAAAADwA/oD8Nf3jFZd4/s320/1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;b&gt;&lt;a href="http://4.bp.blogspot.com/-OSlbDmwW8tk/TqqQv5wDeyI/AAAAAAAADwI/91RaTnfiaAU/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-OSlbDmwW8tk/TqqQv5wDeyI/AAAAAAAADwI/91RaTnfiaAU/s1600/2.jpg" /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;&lt;b&gt;&lt;/b&gt;&lt;b&gt;&lt;/b&gt;&lt;br /&gt;&lt;div style="display: inline !important;"&gt;&lt;b&gt;Step2: - Now simply just add a Web Form in to your Web Application for that just go to  Solution Explorer &amp;gt;&amp;gt; Right click on the Project name&amp;gt;&amp;gt; ADD &amp;gt;&amp;gt; New Item&amp;gt;&amp;gt; Select Web Form.&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-B5mfegz20iE/TqqXmPJcUZI/AAAAAAAADw4/xEMqlMK9LKM/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-B5mfegz20iE/TqqXmPJcUZI/AAAAAAAADw4/xEMqlMK9LKM/s1600/3.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color: black; margin-left: 1em; margin-right: 1em;"&gt;&lt;b&gt;Step3: - Assume that we have the table of Customer like below diagram.&lt;/b&gt;&lt;/span&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-XAXXR3jLwrQ/TqqQ-ujl1VI/AAAAAAAADwQ/DE9KII8NaTc/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;b&gt;&lt;/b&gt;&lt;/a&gt;&lt;b&gt;&lt;a href="http://4.bp.blogspot.com/-PQzFmgQ2iLI/TqqRFZOx9-I/AAAAAAAADwY/VWT7MBqnJzY/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://4.bp.blogspot.com/-PQzFmgQ2iLI/TqqRFZOx9-I/AAAAAAAADwY/VWT7MBqnJzY/s1600/4.jpg" /&gt;&lt;/a&gt;&lt;/b&gt;&lt;/div&gt;Step4: - Design your Web Form like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-ulK_x2f-ckI/TqqaN3OKlmI/AAAAAAAADxA/JtupUutApIM/s1600/5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-ulK_x2f-ckI/TqqaN3OKlmI/AAAAAAAADxA/JtupUutApIM/s1600/5.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://www.blogger.com/goog_1562955996"&gt;&lt;br /&gt;&lt;/a&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;/div&gt;&lt;span class="Apple-style-span" style="color: black; margin-left: 1em; margin-right: 1em;"&gt;Also add a GridView Control to your WebForm.aspx page.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;a href="http://1.bp.blogspot.com/-oDOS7AJUNG8/TqqRMrx-zrI/AAAAAAAADwg/UsjVxxFI284/s1600/5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="http://1.bp.blogspot.com/-oDOS7AJUNG8/TqqRMrx-zrI/AAAAAAAADwg/UsjVxxFI284/s1600/5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;/a&gt;&lt;a href="http://2.bp.blogspot.com/-xcA706q_3Eo/TqqRR3IZnPI/AAAAAAAADwo/JtCjQobSrqk/s1600/6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://2.bp.blogspot.com/-xcA706q_3Eo/TqqRR3IZnPI/AAAAAAAADwo/JtCjQobSrqk/s1600/6.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;Step5: - This is the most important step for creating Unique Customer code.&lt;br /&gt;Add the below code snippet in to your WebForm.aspx.cs file.&lt;br /&gt;&lt;pre&gt;        protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;        {&lt;br /&gt;            if (!IsPostBack)&lt;br /&gt;            {&lt;br /&gt;                AutoGenerateCode();&lt;br /&gt;            }&lt;br /&gt;        }&lt;br /&gt;        public void AutoGenerateCode()&lt;br /&gt;        {&lt;br /&gt;            string Unique Code = "";&lt;br /&gt;            SqlConnection con = new SqlConnection(str);&lt;br /&gt;            con.Open();&lt;br /&gt;            SqlCommand com = new SqlCommand();&lt;br /&gt;            com.CommandText = "select CustCode from Customer where CustomerID in (select max(CustomerID) from Customer)";&lt;br /&gt;            com.Connection = con;&lt;br /&gt;            SqlDataReader objRead = com.ExecuteReader();&lt;br /&gt;            if (objRead.Read())&lt;br /&gt;            {&lt;br /&gt;                UniqueCode = objRead[0].ToString();&lt;br /&gt;                string sd = UniqueCode.Remove(0, 1);&lt;br /&gt;                int sd1 = Int32.Parse(sd) + 1;&lt;br /&gt;                UniqueCode = sd1.ToString();&lt;br /&gt;                if (UniqueCode.Length == 3)&lt;br /&gt;                {&lt;br /&gt;                    UniqueCode = "C" + UniqueCode;&lt;br /&gt;                }&lt;br /&gt;                if (UniqueCode.Length == 2)&lt;br /&gt;                { &lt;br /&gt;                    UniqueCode = "C" + "0" + UniqueCode; &lt;br /&gt;                }&lt;br /&gt;                if (UniqueCode.Length == 1)&lt;br /&gt;                {&lt;br /&gt;                    UniqueCode = "C" + "0" + "0" + UniqueCode; &lt;br /&gt;                }&lt;br /&gt;            }&lt;br /&gt;            else &lt;br /&gt;            {&lt;br /&gt;                UniqueCode = "C001"; &lt;br /&gt;            }&lt;br /&gt;            objRead.Close();&lt;br /&gt;            con.Close();&lt;br /&gt;            TextBox3.Text = UniqueCode;&lt;br /&gt;            //The below line will not allow &lt;br /&gt;            //the user to modify the Unique Code.&lt;br /&gt;            TextBox3.ReadOnly = true;&lt;br /&gt;        }&lt;br /&gt;&lt;/pre&gt;Once you have done with all the above steps simply run the application and will see the result like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-AuOsvZzlp3I/TqqRZQVQBoI/AAAAAAAADww/xzLiLVFzKGU/s1600/7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://3.bp.blogspot.com/-AuOsvZzlp3I/TqqRZQVQBoI/AAAAAAAADww/xzLiLVFzKGU/s1600/7.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;In the above code snippet you can clearly see that the Unique Customer Code is been generated.&lt;br /&gt;&lt;br /&gt;See the following video on ASP.NET Authentication, Authorization, Principal and Identity objects as follows: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/ya9TVH3uPOU?hd=1" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Visit for more &lt;a href="http://www.questpond.com/"&gt;ASP.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Get more from author’s blog for&lt;a href="http://questpond.over-blog.com/article-asp-net-interview-questions-show-us-how-to-generate-a-unique-code-in-asp-net-87436590.html"&gt; ASP.NET interview questions. &lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-1366463363018842534?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/1366463363018842534/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=1366463363018842534' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1366463363018842534'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1366463363018842534'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/aspnet-interview-questions-unique-code.html' title='ASP.NET interview questions: - Unique Code in ASP.NET.'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-Ez_Lc__KdjM/TqqQp564fKI/AAAAAAAADwA/oD8Nf3jFZd4/s72-c/1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-1176734516405293060</id><published>2011-10-25T05:27:00.000-07:00</published><updated>2011-10-25T05:59:28.311-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Ado.Net Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='optimistic locking'/><category scheme='http://www.blogger.com/atom/ns#' term='Ado.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='Locking'/><category scheme='http://www.blogger.com/atom/ns#' term='optimistic'/><title type='text'>ADO.NET interview questions: -  What are the ways to implement optimistic locking in ADO.NET?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;An interesting &lt;a href="http://www.questpond.com/"&gt;ADO.NET interview questions&lt;/a&gt; mostly asked by the interviewer during an interview. Following are the ways to implement optimistic locking using &lt;b&gt;ADO.NET&lt;/b&gt;: -&lt;br /&gt;&lt;br /&gt;&lt;ul&gt;&lt;li&gt;When we call &lt;b&gt;“Update”&lt;/b&gt; method of Data Adapter it handles locking internally. If the Dataset values are not matching with current data in Database, it raises concurrency exception error. We can easily trap this error using Try. Catch block and raise appropriate error message to the user.&lt;br /&gt;&amp;nbsp;&lt;/li&gt;&lt;li&gt;Define a Date time stamp field in the table. When actually you are firing the&lt;b&gt; UPDATE SQL&lt;/b&gt; statements, compare the current timestamp with one existing in the database. Below is a sample SQL which checks for timestamp before updating and any mismatch in timestamp it will not update the records. This I the best practice used by industries for locking.&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;   Update table1 set field1=@test where Last Timestamp=@Current Timestamp&lt;/pre&gt;&lt;ul&gt;&lt;li&gt; Check for original values stored in &lt;b&gt;SQL SERVER&lt;/b&gt; and actual changed values. In stored procedure check before updating that the old data is same as the current Example in the below shown  &lt;b&gt;SQL&lt;/b&gt; before updating field1 we check that is the old field1 value same. If not then some one else has updated and necessary action has to be taken.&lt;/li&gt;&lt;/ul&gt;&lt;pre&gt;Update table1 set field1=@test where field1 = @oldfield1value&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;&lt;pre&gt;&lt;/pre&gt;Locking can be handled at ADO.NET side or at SQL SERVER side i.e. in stored procedures.&lt;br /&gt;&lt;br /&gt;&amp;nbsp;Know more on UML’s object diagram by viewing the following video: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/InhoIpyMLvg" width="420"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;For more on &lt;a href="http://www.questpond.com/"&gt;ADO.NET interview questions&lt;/a&gt;, so click and visit.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Author’s more on &lt;a href="http://dotnetinter.livejournal.com/48771.html"&gt;ADO.NET interview questions.&lt;br /&gt;&lt;/a&gt;&lt;/div&gt;&lt;a href="http://dotnetinter.livejournal.com/48771.html"&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-1176734516405293060?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/1176734516405293060/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=1176734516405293060' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1176734516405293060'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1176734516405293060'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/adonet-interview-questions-what-is-ways.html' title='ADO.NET interview questions: -  What are the ways to implement optimistic locking in ADO.NET?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/InhoIpyMLvg/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-3174746010335914552</id><published>2011-10-22T00:48:00.000-07:00</published><updated>2011-10-22T00:48:03.300-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Editable'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Updateable'/><category scheme='http://www.blogger.com/atom/ns#' term='GridView'/><category scheme='http://www.blogger.com/atom/ns#' term='Deleteable'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>ASP.NET interview questions: - How to make GridView Editable, Updateable and Deleteable in ASP.NET?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;div style="text-align: center;"&gt;&lt;span class="Apple-style-span" style="color: #0000ee;"&gt;&lt;u&gt;&lt;br /&gt;&lt;/u&gt;&lt;/span&gt;&lt;/div&gt;The process of making &lt;b&gt;GridView Editable, Updateable and Deleteable&lt;/b&gt; is almost used in the entire ASP.NET project. So, making&amp;nbsp;&lt;b&gt;GridView Editable, Updateable and Deleteable&lt;/b&gt; is one of the most important aspects according to any ASP.NET project.&lt;br /&gt;&lt;br /&gt;Let’s create a simple demonstration to understand the concept of making &lt;b&gt;GridView Editable, Updateable and Deleteable&lt;/b&gt; in much better manner.&lt;br /&gt;&lt;br /&gt;In order to see it practically you just need to follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1: - &lt;/b&gt;Create a simple&lt;b&gt; ASP.NET Web Application&lt;/b&gt; for that just open Visual Studio&amp;nbsp;&lt;b&gt;&amp;gt;&amp;gt;go to &amp;gt;&amp;gt; File &amp;gt;&amp;gt; New &amp;gt;&amp;gt; Project &amp;gt;&amp;gt; Web &amp;gt;&amp;gt; Select ASP.NET Empty Web Application.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-Je4W90fn0uQ/TqJph1VyOMI/AAAAAAAADug/_eSeKLml5Qw/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="78" src="http://1.bp.blogspot.com/-Je4W90fn0uQ/TqJph1VyOMI/AAAAAAAADug/_eSeKLml5Qw/s320/1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-JWcu4CXwKgo/TqJp4G4wetI/AAAAAAAADuo/yO6tfmlqxEk/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="31" src="http://2.bp.blogspot.com/-JWcu4CXwKgo/TqJp4G4wetI/AAAAAAAADuo/yO6tfmlqxEk/s320/2.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Step2: -&lt;/b&gt; Now, simply just add a &lt;b&gt;Web Form &lt;/b&gt;to your&lt;b&gt; ASP.NET&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Empty Web Application&lt;/b&gt; for that just &lt;b&gt;go to &amp;gt;&amp;gt; Solution Explorer &amp;gt;&amp;gt; Right Click on the project name &amp;gt;&amp;gt; Add &amp;gt;&amp;gt; New Item &amp;gt;&amp;gt; Select Web Form.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-VDkpgUP5nH4/TqJp_mXojeI/AAAAAAAADuw/3FKcWOyHdqw/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="33" src="http://2.bp.blogspot.com/-VDkpgUP5nH4/TqJp_mXojeI/AAAAAAAADuw/3FKcWOyHdqw/s320/3.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Now, simply just drag and drop &lt;b&gt;GridView&lt;/b&gt; to your &lt;b&gt;Web Form&lt;/b&gt; and allow the below&lt;br /&gt;&lt;b&gt;properties&lt;/b&gt; to &lt;b&gt;true.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. &lt;/b&gt;Allow &lt;b&gt;AutoGenerateEditButton&lt;/b&gt; to&lt;b&gt; True.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2.&lt;/b&gt; Allow&lt;b&gt; AutoGenerateDeleteButton&lt;/b&gt; to &lt;b&gt;True.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-cchVU7zE2aU/TqJqJrj7g6I/AAAAAAAADu4/yaQbNd7WnHc/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-cchVU7zE2aU/TqJqJrj7g6I/AAAAAAAADu4/yaQbNd7WnHc/s1600/4.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now, as soon as you set the above &lt;b&gt;two properties&lt;/b&gt; you will see the &lt;b&gt;GridView&lt;/b&gt; like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-3i-HTN0t8pM/TqJqQ6Kwl5I/AAAAAAAADvA/guG7K7rEUuw/s1600/5.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" src="http://1.bp.blogspot.com/-3i-HTN0t8pM/TqJqQ6Kwl5I/AAAAAAAADvA/guG7K7rEUuw/s1600/5.jpg" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Step3: -&lt;/b&gt; Now, let&lt;b&gt; bind&lt;/b&gt; the&lt;b&gt; GridView&lt;/b&gt; with Data for that just add the below&lt;br /&gt;&lt;b&gt;code snippet&lt;/b&gt; in to your &lt;b&gt;WebForm.aspx.cs&lt;/b&gt; file.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;        //Below variable holds the Connection String.&lt;br /&gt;string &lt;b&gt;str =&lt;/b&gt; ConfigurationManager.AppSettings&lt;b&gt;["&lt;/b&gt;Connect&lt;b&gt;"];&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;protected void &lt;b&gt;Page_Load&lt;/b&gt;(object &lt;b&gt;sender,&lt;/b&gt; EventArgs &lt;b&gt;e&lt;/b&gt;)&lt;br /&gt;&lt;b&gt; {&lt;/b&gt;&lt;br /&gt;  if &lt;b&gt;(!IsPostBack&lt;/b&gt;)&lt;br /&gt;  {&lt;br /&gt;     &lt;b&gt; GridViewData();&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;}&lt;br /&gt;}&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;&lt;pre&gt;//Created a &lt;b&gt;GridViewData &lt;/b&gt;method to bind data to GridView&lt;br /&gt;//from the SQL Server DataBase Table.&lt;br /&gt;public void &lt;b&gt;GridViewData()&lt;/b&gt;&lt;br /&gt;{&lt;br /&gt;  SqlConnection &lt;b&gt;con&lt;/b&gt; = new SqlConnection&lt;b&gt;(str);&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;con.Open();&lt;/b&gt;&lt;br /&gt;  SqlCommand &lt;b&gt;com&lt;/b&gt; = new SqlCommand&lt;b&gt;();&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;com.CommandText&lt;/b&gt; &lt;b&gt;=&lt;/b&gt; "select * from Book"&lt;b&gt;;&lt;/b&gt;&lt;br /&gt;  com.Connection = con;&lt;br /&gt;  com.ExecuteNonQuery();&lt;br /&gt;  SqlDataAdapter adap = new SqlDataAdapter(com);&lt;br /&gt;  DataSet &lt;b&gt;ds&lt;/b&gt; = new DataSet&lt;b&gt;();&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;adap.Fill(ds);&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;GridView1.DataSource = ds;&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;GridView1.DataBind();&lt;/b&gt;&lt;br /&gt;&lt;b&gt;}&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Step4: - &lt;/b&gt;This is the most important step while making &lt;b&gt;GridView Editable, Updateable and Deleteable.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Now, simply just add the below &lt;b&gt;Events&lt;/b&gt; of the &lt;b&gt;GridView&lt;/b&gt; control in to your&lt;br /&gt;&lt;b&gt;Web&lt;/b&gt; &lt;b&gt;Application&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. OnRowEditing.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;2. OnRowCancelingEdit.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;3. OnRowUpdating.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;4. OnRowDeleting.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-bWcxKQvULa4/TqJqXeEKmhI/AAAAAAAADvI/e42aDh2-tJI/s1600/6.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="205" src="http://4.bp.blogspot.com/-bWcxKQvULa4/TqJqXeEKmhI/AAAAAAAADvI/e42aDh2-tJI/s320/6.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;b&gt;Step5: -&lt;/b&gt; now, just add the below code snippet to make necessary changes on the respective events of the&lt;br /&gt;&lt;b&gt;GridView&lt;/b&gt; control.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1.&lt;/b&gt; &lt;b&gt;OnRowEditing&lt;/b&gt; add the below code snippet.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt; protected void GridView1_RowEditing(object sender, &lt;b&gt;GridViewEditEventArgs&lt;/b&gt; e)&lt;br /&gt;&lt;b&gt; {&lt;/b&gt;&lt;br /&gt;  GridView1.EditIndex = e.NewEditIndex;&lt;br /&gt;  GridViewData();&lt;br /&gt;&lt;b&gt;  }&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;2.&lt;/b&gt; &lt;b&gt;OnRowCanelingEdit&lt;/b&gt; add the below code snippet.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt; protected void GridView1_RowCancelingEdit&lt;b&gt;(&lt;/b&gt;object sender, &lt;b&gt;GridViewCancelEditEventArgs&lt;/b&gt; e&lt;b&gt;)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;{&lt;/b&gt;&lt;br /&gt; &lt;b&gt; GridView1.EditIndex = -1;&lt;br /&gt;  GridViewData();&lt;/b&gt;&lt;br /&gt;&lt;b&gt;}&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;3. OnRowDeleting add the below code snippet.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt; protected void GridView1_RowDeleting&lt;b&gt;(&lt;/b&gt;object sender, GridViewDeleteEventArgs e&lt;b&gt;)&lt;/b&gt;&lt;br /&gt;&lt;b&gt;  {&lt;/b&gt;&lt;br /&gt;  //The below line of code will hold the Cells[1] data of th &lt;b&gt;GridView&lt;/b&gt; Control.&lt;br /&gt;  string id = GridView1.Rows[e.RowIndex].Cells[1]&lt;b&gt;.Text;&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;SqlConnection&lt;/b&gt; con = new &lt;b&gt;SqlConnection&lt;/b&gt;(str);&lt;br /&gt;  &lt;b&gt;con&lt;/b&gt;.&lt;b&gt;Open&lt;/b&gt;();&lt;br /&gt;  SqlCommand com = new &lt;b&gt;SqlCommand&lt;/b&gt;();&lt;br /&gt;  &lt;b&gt;com&lt;/b&gt;.&lt;b&gt;CommandText&lt;/b&gt; = "delete from Book where &lt;b&gt;Book_Id&lt;/b&gt; = &lt;b&gt;'"+id+"'";&lt;/b&gt;&lt;br /&gt;  &lt;b&gt;com.Connection&lt;/b&gt; = &lt;b&gt;con&lt;/b&gt;;&lt;br /&gt;  &lt;b&gt;com.ExecuteNonQuery&lt;/b&gt;();&lt;br /&gt;  &lt;b&gt;GridViewData();&lt;/b&gt;&lt;br /&gt;&lt;b&gt; }&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;4. OnRowUpdating add the below code snippet.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;        protected void &lt;b&gt;GridView1_RowUpdating(object sender,&lt;/b&gt; &lt;b&gt;GridViewUpdateEventArgs&lt;/b&gt; e)&lt;br /&gt;{&lt;br /&gt;  string id = ((TextBox)GridView1.Rows[e.RowIndex].&lt;b&gt;Cells[1].Controls&lt;/b&gt;[0]).Text;&lt;br /&gt;  &lt;b&gt;string&lt;/b&gt; &lt;b&gt;bookname&lt;/b&gt; = ((&lt;b&gt;TextBox)GridView1.Rows[e.RowIndex].Cells[2].Controls[0]).Text;&lt;/b&gt;            &lt;b&gt;string author = ((TextBox)GridView1.Rows[e.RowIndex].Cells[3].Controls[0]).Text;&lt;br /&gt;  string price = ((TextBox)GridView1.Rows[e.RowIndex].Cells[4].Controls[0]).Text;&lt;br /&gt;  string quantity = ((TextBox)GridView1.Rows[e.RowIndex].Cells[5].Controls[0]).Text;&lt;br /&gt;  SqlConnection con = new SqlConnection(str);&lt;br /&gt;  con.Open();&lt;br /&gt;  SqlCommand com = new SqlCommand();&lt;br /&gt;  com.CommandText = "update Book set Book_Name='" + bookname + "',Book_Author='" + author + "',Book_Price='" + price + "',Book_Quantity='" + quantity + "' where Book_Id= '" + id + "'";&lt;br /&gt;  com.Connection = con;&lt;br /&gt;  com.ExecuteNonQuery();&lt;br /&gt;  GridViewData();&lt;br /&gt;}&lt;/b&gt;&lt;/pre&gt;&lt;br /&gt;&lt;b&gt;Note: -&lt;/b&gt; You can modify your code according to your requirements.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step6: -&lt;/b&gt; Now, let’s run your Web Application and see the respective results.&lt;br /&gt;&lt;br /&gt;Let’s first see the result for deleting.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-UdfzvG7njRk/TqJqhO5RZeI/AAAAAAAADvQ/2J4gCBr-eZ4/s1600/7.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="99" src="http://2.bp.blogspot.com/-UdfzvG7njRk/TqJqhO5RZeI/AAAAAAAADvQ/2J4gCBr-eZ4/s320/7.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;The above diagram is my &lt;b&gt;output&lt;/b&gt; of the loaded &lt;b&gt;GridView&lt;/b&gt; and note that I am going to delete the&lt;br /&gt;&lt;b&gt;circled&lt;/b&gt; row data from the &lt;b&gt;GridView&lt;/b&gt; control.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Now,&lt;/b&gt; as soon as you click on the delete link will see the result like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-MIz7GiAhc-Y/TqJqmVepz5I/AAAAAAAADvY/TJfR7nvqzjs/s1600/8.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="81" src="http://4.bp.blogspot.com/-MIz7GiAhc-Y/TqJqmVepz5I/AAAAAAAADvY/TJfR7nvqzjs/s320/8.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the above result of diagram you can see that the data has been deleted.&lt;br /&gt;&lt;br /&gt;Similarly, let’s see the result for &lt;b&gt;updating&lt;/b&gt; the &lt;b&gt;below circled row data&lt;/b&gt; in the&lt;br /&gt;&lt;b&gt;GridView&lt;/b&gt; control.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://4.bp.blogspot.com/-URHmxoLyMyk/TqJqsxg61-I/AAAAAAAADvg/uvy-EF4FQDc/s1600/9.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="83" src="http://4.bp.blogspot.com/-URHmxoLyMyk/TqJqsxg61-I/AAAAAAAADvg/uvy-EF4FQDc/s320/9.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now, as soon as you click on the edit link you will see something like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-7zz79bWWjIg/TqJr3kTcTYI/AAAAAAAADvw/5IYV4WxgkZ8/s1600/10.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="69" src="http://2.bp.blogspot.com/-7zz79bWWjIg/TqJr3kTcTYI/AAAAAAAADvw/5IYV4WxgkZ8/s320/10.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;Now, let’s modify the Book_Author Name as Kalim Shaikh and click on the Update link and see whether the data is updated or not.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-VhKiu2r6Erg/TqJsf5rU6OI/AAAAAAAADv4/m4o3Ij8pXww/s1600/11.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="129" src="http://3.bp.blogspot.com/-VhKiu2r6Erg/TqJsf5rU6OI/AAAAAAAADv4/m4o3Ij8pXww/s320/11.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the above output diagram you can clearly see that now the &lt;b&gt;Book_Author&lt;/b&gt; name is modified to&lt;br /&gt;&lt;b&gt;Kalim Shaikh&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;See the following video on ASP.NET Tracing and instrumentation.&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/XhxpKvNGUsw?hd=1" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Visit for more&lt;a href="http://www.questpond.com/"&gt; ASP.NET interview questions.&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;For more author's blog on&lt;a href="http://dotnetinter.livejournal.com/48411.html"&gt; ASP.NET interview questions&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-3174746010335914552?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/3174746010335914552/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=3174746010335914552' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3174746010335914552'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3174746010335914552'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/aspnet-interview-questions-how-to-make.html' title='ASP.NET interview questions: - How to make GridView Editable, Updateable and Deleteable in ASP.NET?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-Je4W90fn0uQ/TqJph1VyOMI/AAAAAAAADug/_eSeKLml5Qw/s72-c/1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-3132430086163726820</id><published>2011-10-20T06:58:00.000-07:00</published><updated>2011-10-20T06:59:37.280-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.net interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>C# interview questions: - What is the difference between “int” and “Int32” in C#?</title><content type='html'>&lt;h4 class="contentSpacer"&gt;What is the difference between “int” and “Int32” in C#?&lt;/h4&gt;&lt;br /&gt;&lt;p&gt;for more .net and c# interview questions videos click on &lt;a href="http://www.questpond.com"&gt;.NET and c# interview questions &lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-3132430086163726820?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/3132430086163726820/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=3132430086163726820' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3132430086163726820'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3132430086163726820'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/c-interview-questions-what-is.html' title='C# interview questions: - What is the difference between “int” and “Int32” in C#?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-6688979633943848544</id><published>2011-10-20T05:50:00.000-07:00</published><updated>2011-10-20T05:50:33.785-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='params'/><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Question'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>.NET interview questions: - Uses of the Params Keyword in C#.</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;This is the one the typical &lt;a href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt; and also the favorable question of the interviewers.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Params: -&lt;/b&gt; The &lt;b&gt;params&lt;/b&gt; keyword lets you specify a method parameter that takes an argument where the number of arguments is variable.&lt;br /&gt;&lt;br /&gt;So, let’s take a scenario where we can have the use of the &lt;b&gt;Params&lt;/b&gt; keyword.&lt;br /&gt;Below is the &lt;b&gt;scenario&lt;/b&gt; for the same.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;    class Program&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;            int y = Add(10, 20);&lt;br /&gt;            Console.WriteLine("The Addition of two Numbers is : " + y);&lt;br /&gt;            Console.ReadLine();&lt;br /&gt;        }&lt;br /&gt;        static int Add(int Num1, int Num2)&lt;br /&gt;        {&lt;br /&gt;            return Num1 + Num2;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;In the above code snippet you can see that I have created a function&lt;b&gt; “Add”&lt;/b&gt;which takes two parameters as &lt;b&gt;“Num1”&lt;/b&gt; and &lt;b&gt;“Num2”&lt;/b&gt; and return the addition of two numbers. The value for the &lt;b&gt;parameters&lt;/b&gt; are been passed from the Main and it simply print the output to the screen of the “y” variable.&lt;br /&gt;&lt;br /&gt;Now, simply just run your Application and will see the result like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://2.bp.blogspot.com/-Qh6edlHwZCw/TqAXZ7OhW2I/AAAAAAAADs4/fz6a729LU7s/s1600/1.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="98" src="http://2.bp.blogspot.com/-Qh6edlHwZCw/TqAXZ7OhW2I/AAAAAAAADs4/fz6a729LU7s/s320/1.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;The above code snippet seems to be working fine but what if want to pass multiple arguments at a single instance. So, the&lt;b&gt; Params Keyword&lt;/b&gt; helps us to achieve the above scenario in much better manner.&lt;br /&gt;&lt;br /&gt;Let’s create a simple example to understand the use of &lt;b&gt;Params Keyword&lt;/b&gt; in much better manner.&lt;br /&gt;In order to perform practically you just need to follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1: - &lt;/b&gt;create a simple Console Application for that just open &lt;b&gt;Visual Studio go to &amp;gt;&amp;gt; File &amp;gt;&amp;gt; New &amp;gt;&amp;gt; Project &amp;gt;&amp;gt; Windows &amp;gt;&amp;gt; Select Console Application.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-ALmNx1OoELM/TqAXi-gJIUI/AAAAAAAADtA/uAJfRp4Q4RY/s1600/2.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="78" src="http://1.bp.blogspot.com/-ALmNx1OoELM/TqAXi-gJIUI/AAAAAAAADtA/uAJfRp4Q4RY/s320/2.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;br /&gt;&lt;/div&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://1.bp.blogspot.com/-EX1YTnnk-kw/TqAXqaPUepI/AAAAAAAADtI/GOI2W7J91WM/s1600/3.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="75" src="http://1.bp.blogspot.com/-EX1YTnnk-kw/TqAXqaPUepI/AAAAAAAADtI/GOI2W7J91WM/s320/3.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;pre&gt;&lt;br /&gt;&lt;/pre&gt;&lt;b&gt;Step2: -&lt;/b&gt; Now, simply just add the below Code Snippet in to &lt;b&gt;Program.cs&lt;/b&gt; file of your&lt;b&gt; Console Application.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;pre&gt;    class Program&lt;br /&gt;    {&lt;br /&gt;        static void Main(string[] args)&lt;br /&gt;        {&lt;br /&gt;//Passed 5 different values.&lt;br /&gt;            int y =  Add(10,20,30,40,50);&lt;br /&gt;            Console.WriteLine("The Addition of  Numbers are : " + y);&lt;br /&gt;            Console.ReadLine();&lt;br /&gt;        }&lt;br /&gt;//Created a listNumbers variable as declared as Params.&lt;br /&gt;        static int Add(params int[] listNumbers)&lt;br /&gt;        {&lt;br /&gt;            int Total = 0;&lt;br /&gt;            foreach (int i in listNumbers)&lt;br /&gt;            {&lt;br /&gt;                Total = i + Total;&lt;br /&gt;            }&lt;br /&gt;            return Total;&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;In the above code snippet you can see that I have created a function&lt;b&gt; “Add”&lt;/b&gt; with a Variable&lt;b&gt; “listNumbers”&lt;/b&gt;declared using&lt;b&gt; params.&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Now, simply just run your&lt;b&gt; Console Application &lt;/b&gt;and will see the result like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;div class="separator" style="clear: both; text-align: center;"&gt;&lt;a href="http://3.bp.blogspot.com/-tU_GgI91ApA/TqAXygkV06I/AAAAAAAADtQ/VLPS6L8HJN0/s1600/4.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="96" src="http://3.bp.blogspot.com/-tU_GgI91ApA/TqAXygkV06I/AAAAAAAADtQ/VLPS6L8HJN0/s320/4.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;In the above diagram of output you can see the addition of the five numbers using&lt;b&gt; params&lt;/b&gt; keyword.&lt;br /&gt;&lt;br /&gt;If not understood from the above article, then see the following video on&lt;b&gt; params&lt;/b&gt; keyword: -&lt;br /&gt;&lt;br /&gt;&lt;iframe allowfullscreen="" frameborder="0" height="315" src="http://www.youtube.com/embed/4LeAF2Et7YM?hd=1" width="560"&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;Get our articles on &lt;a href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt; for preparation.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Regards,&lt;/b&gt;&lt;br /&gt;&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;See author’s other &lt;a href="http://dotnetinter.livejournal.com/48334.html"&gt;.NET interview questions&lt;/a&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-6688979633943848544?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/6688979633943848544/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=6688979633943848544' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/6688979633943848544'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/6688979633943848544'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/net-interview-questions-uses-of-params.html' title='.NET interview questions: - Uses of the Params Keyword in C#.'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-Qh6edlHwZCw/TqAXZ7OhW2I/AAAAAAAADs4/fz6a729LU7s/s72-c/1.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-4816250824617686184</id><published>2011-10-19T05:02:00.000-07:00</published><updated>2011-10-19T05:04:18.507-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.net interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>Learn .NET in 60 days - Day 1</title><content type='html'>&lt;span id="lblAboutClass"&gt;This class is for beginners who want to learn .NET.&lt;/span&gt;&lt;br /&gt;&lt;p&gt;for more .net and c# interview questions videos click on &lt;a href="http://www.questpond.com"&gt;.NET and c# interview questions &lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-4816250824617686184?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/4816250824617686184/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=4816250824617686184' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4816250824617686184'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4816250824617686184'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/learn-net-in-60-days-day-1.html' title='Learn .NET in 60 days - Day 1'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-8162401313069532872</id><published>2011-10-19T04:59:00.000-07:00</published><updated>2011-10-19T05:01:42.025-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.net interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='sharepoint 2010 interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>Test yourself for Sharepoint 2010 interviews</title><content type='html'>&lt;span id="lblDescription"&gt;This test will help you to check if u will  ready for Sharepoint 2010 interviews,try to get 100% marks to ensure you  are completely ready.&lt;br /&gt;&lt;br /&gt;Best of luck&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;for more .net and c# interview questions videos click on &lt;a href="http://www.questpond.com/"&gt;.NET and c# interview questions &lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-8162401313069532872?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/8162401313069532872/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=8162401313069532872' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8162401313069532872'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8162401313069532872'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/test-yourself-for-sharepoint-2010.html' title='Test yourself for Sharepoint 2010 interviews'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-7750622043513045840</id><published>2011-10-19T04:56:00.000-07:00</published><updated>2011-10-19T04:59:01.476-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.net interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>.NET and c# interview question practice test - 1</title><content type='html'>&lt;span id="lblDescription"&gt;.NET and c# interview question practice test. &lt;/span&gt;&lt;br /&gt;&lt;p&gt;for more .net and c# interview questions videos click on &lt;a href="http://www.questpond.com/"&gt;.NET and c# interview questions &lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-7750622043513045840?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/7750622043513045840/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=7750622043513045840' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/7750622043513045840'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/7750622043513045840'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/net-and-c-interview-question-practice.html' title='.NET and c# interview question practice test - 1'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-3116315925373501854</id><published>2011-10-19T04:53:00.000-07:00</published><updated>2011-10-19T04:56:19.125-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.net interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>ASP.NET interview questions test :- ASP.NET Page life cycle</title><content type='html'>&lt;span id="lblDescription"&gt;Arrange the page life cycle sequence in a proper manner. Hint :- SILVER&lt;/span&gt;&lt;br /&gt;&lt;p&gt;for more .net and c# interview questions videos click on &lt;a href="http://www.questpond.com"&gt;.NET and c# interview questions &lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-3116315925373501854?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/3116315925373501854/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=3116315925373501854' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3116315925373501854'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3116315925373501854'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/aspnet-interview-questions-test-aspnet.html' title='ASP.NET interview questions test :- ASP.NET Page life cycle'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5753173370730923055</id><published>2011-10-19T01:20:00.001-07:00</published><updated>2011-10-19T01:48:15.528-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Lambda expression'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>C# and .NET interview questions: - Explain with practical Lambda Expression in C#?</title><content type='html'>&lt;div dir="ltr" style="text-align: left;" trbidi="on"&gt;&lt;p&gt;&lt;strong&gt;Lambda expression: - &lt;/strong&gt;A &lt;strong&gt;Lambda expression&lt;/strong&gt; is an &lt;strong&gt;anonymous function &lt;/strong&gt;that can contain &lt;strong&gt;expressions &lt;/strong&gt;and &lt;strong&gt;statements,&lt;/strong&gt; and can be used to create &lt;strong&gt;delegates&lt;/strong&gt; or&lt;strong&gt; expression tree types.&lt;/strong&gt;&lt;/p&gt;In simple words&lt;strong&gt; Lambda expression&lt;/strong&gt; is nothing but it is  an &lt;strong&gt;extended version &lt;/strong&gt;of &lt;strong&gt;delegates&lt;/strong&gt; or in other words it making &lt;strong&gt;delegates simpler.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;All &lt;strong&gt;Lambda expression&lt;/strong&gt; uses the &lt;strong&gt;lambda operator&lt;/strong&gt; (=&amp;gt;).&lt;br /&gt;&lt;br /&gt;The left side of the&lt;strong&gt; lambda operator&lt;/strong&gt; specifies the &lt;strong&gt;input parameters&lt;/strong&gt; (if any) and the right side hold the&lt;strong&gt; expression or statement block.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;Let’s create a simple example to understand the concept of &lt;strong&gt;Lambda expression&lt;/strong&gt; in much better manner.&lt;br /&gt;&lt;br /&gt;In order to see it practically you just need to follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;strong&gt;Step1: -&lt;/strong&gt; Create a simple Console Application for that just open Visual Studio &amp;gt;&amp;gt;&lt;strong&gt; go to&lt;/strong&gt; &amp;gt;&amp;gt; &lt;strong&gt;File &lt;/strong&gt;&amp;gt;&amp;gt; &lt;strong&gt;New&lt;/strong&gt; &amp;gt;&amp;gt; &lt;strong&gt;Project&lt;/strong&gt; &amp;gt;&amp;gt; &lt;strong&gt;Windows&lt;/strong&gt; &amp;gt;&amp;gt; &lt;strong&gt;Select Console Application.&lt;/strong&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://4.bp.blogspot.com/-tEl7TgTF1ns/Tp6IeaFqvWI/AAAAAAAADsM/04l28PIYSN4/s1600/1.JPG" width="560" height="140" alt="lambda" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://4.bp.blogspot.com/-rjl0nGJs94w/Tp6IeQ4Gw9I/AAAAAAAADsY/Py6uFR05jL4/s1600/2.JPG" width="354" height="77" alt="lambda" /&gt;&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Step2: -&lt;/strong&gt; Now, simply just add the below code snippet in to program.&lt;strong&gt;cs file&lt;/strong&gt; of your Console Application.&lt;/p&gt;&lt;pre&gt;class Program&lt;br /&gt; {&lt;br /&gt;     //created a delegate.&lt;br /&gt;     delegate void PointToCallMe(string str);&lt;br /&gt;     static void Main(string[] args)&lt;br /&gt;     {&lt;br /&gt;         //Delegate,which points to the CallMe Function.&lt;br /&gt;         PointToCallMe objDelegate = new PointToCallMe(CallMe);&lt;br /&gt;         objDelegate.Invoke("Called from Delegate");&lt;br /&gt;         Console.ReadLine();&lt;br /&gt;     }&lt;br /&gt;     public static void CallMe(string str)&lt;br /&gt;     {&lt;br /&gt;         Console.WriteLine(str);&lt;br /&gt;     }&lt;br /&gt; }&lt;/pre&gt;&lt;p&gt;In the above code snippet you can see that I have created a function CallMe with a string parameter “str” and I have created a delegate which points toward the CallMe function.&lt;/p&gt;&lt;p&gt;Now, simply just run your console application and you should see the result as shown in the below diagram.&lt;/p&gt;&lt;img src="http://3.bp.blogspot.com/-LkP8OPBDe6o/Tp6IeqCIXrI/AAAAAAAADsk/C2o1sQQ3esw/s1600/3.JPG" width="346" height="83" alt="lambda" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;p&gt;The above code is nice it work’s properly but the concern here is the code complexity; you can see that for a simple line of output we have created extra function, which makes your code little lengthy and not very easy to read.&lt;/p&gt;&lt;p&gt;So &lt;strong&gt;Lambda Expression &lt;/strong&gt;helps us to solve the above problem in simplified manner and making our code more readable and understandable.&lt;/p&gt;&lt;p&gt;Let’s see how exactly&lt;strong&gt; Lambda Expression&lt;/strong&gt; help to solve the above problem for that you just need to follow the following step.&lt;/p&gt;&lt;p&gt;&lt;strong&gt;Step3: -&lt;/strong&gt; Now, just simply modify the program.&lt;strong&gt;cs file&lt;/strong&gt; like below code snippet.&lt;/p&gt;&lt;pre&gt;    class Program&lt;br /&gt; {&lt;br /&gt;     //created a delegate.&lt;br /&gt;     delegate void PointToCallMe(string str);&lt;br /&gt;     static void Main(string[] args)&lt;br /&gt;     {&lt;br /&gt;         //Lambda Expression.&lt;br /&gt;         PointToCallMe objLambda = str =&amp;gt; Console.WriteLine(str);&lt;br /&gt;         objLambda.Invoke("Called from Lambda");&lt;br /&gt;         Console.ReadLine();&lt;br /&gt;     }&lt;br /&gt; }&lt;/pre&gt;&lt;p&gt;Now, in the above code snippet you can see that I have just eliminated the extra created CallMe function and just written a few line of &lt;strong&gt;Lambda Expression,&lt;/strong&gt; which makes your code more readable and understandable with a few line of code.&lt;/p&gt;&lt;p&gt;Now, simply just run your console application and will see result like below output diagram.&lt;/p&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-Ses6bxU62RE/Tp6Ie2estQI/AAAAAAAADsw/fAlAi2XPjIw/s1600/4.JPG" width="348" height="77" alt="lambda" /&gt;&lt;br /&gt;&lt;p&gt; Watch the following interesting video on threading in &lt;strong&gt;C#.NET: -&lt;/strong&gt;&lt;/p&gt;&lt;p&gt;&lt;iframe width="560" height="315" src="http://www.youtube.com/embed/Fzckqczmgd0?hd=1" frameborder="0" allowfullscreen=""&gt;&lt;/iframe&gt;&lt;/p&gt;&lt;br /&gt;Get our more &lt;a href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt; materials.&lt;br /&gt;&lt;p&gt;Regards,&lt;/p&gt;&lt;p&gt;Visit more author's other &lt;a href="http://questpond.over-blog.com/article-c-and-net-interview-questions-what-is-lambda-expression-in-c-86817540.html"&gt;.NET interview questions&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5753173370730923055?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5753173370730923055/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5753173370730923055' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5753173370730923055'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5753173370730923055'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/c-and-net-interview-questions-explain.html' title='C# and .NET interview questions: - Explain with practical Lambda Expression in C#?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-tEl7TgTF1ns/Tp6IeaFqvWI/AAAAAAAADsM/04l28PIYSN4/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-2795992241309495947</id><published>2011-10-18T00:43:00.000-07:00</published><updated>2011-10-18T00:44:54.977-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.net interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>In a parent child relationship which constructor fires first ?</title><content type='html'>&lt;iframe src="http://www.youtube.com/embed/_w-VW34cN9I?fs=1" allowfullscreen="" width="480" frameborder="0" height="270"&gt;&lt;/iframe&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-2795992241309495947?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/2795992241309495947/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=2795992241309495947' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2795992241309495947'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2795992241309495947'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/in-parent-child-relationship-which.html' title='In a parent child relationship which constructor fires first ?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/_w-VW34cN9I/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-8777942674207719960</id><published>2011-10-17T07:08:00.000-07:00</published><updated>2011-10-17T07:42:29.533-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Casting'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>C# and .NET interview questions: - What is the need of Casting in C#? What is casting?</title><content type='html'>&lt;p&gt;This is one of the typical &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt; and has been asked in many of the mid .NET and c# interviews, also the favorable question of the interviewers where they check your skills on &lt;b&gt;casting&lt;/b&gt;. Many of our developer friends who are having 1 to 2 years of experience in development also fail to answer this question.&lt;br /&gt;&lt;br /&gt;So, let me explain first explain the need of casting.&lt;br /&gt;&lt;br /&gt;Let’s create a small and simple demonstration in order to understand the need of&lt;br /&gt;casting in much better manner.&lt;br /&gt;&lt;br /&gt;In order to see it practically just follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1&lt;/b&gt;: - Create a Console Application for that just open &lt;b&gt;Visual Studio&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;go to&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;File&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;New&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Project&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Windows&lt;/b&gt;  &amp;gt;&amp;gt; &lt;b&gt;Select Console Application&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-W5UNzaUuOCY/Tpw3IO9UX3I/AAAAAAAADpk/is86FFWIhvw/s400/1.JPG" border="0" height="140" width="560" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://2.bp.blogspot.com/-1I_BpPKqVHw/Tpw3IeSS-yI/AAAAAAAADpw/V5pLuvuWokU/s400/2.JPG" border="0" height="41" width="354" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step2&lt;/b&gt;: - Now, simply just add the &lt;b&gt;below code snippet&lt;/b&gt; in to &lt;b&gt;program.cs&lt;/b&gt; file of your &lt;b&gt;Console Application&lt;/b&gt;.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;int i = 45.12;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;In the above code snippet you can see that I have created an “int” variable “i” and we are trying to move data with decimal part in to the ‘int’ data type.&lt;br /&gt;&lt;p&gt;As you know that the “int” data type can only contain positive or negative value in it and not the decimal part.&lt;br /&gt;&lt;br /&gt;Now if you try to compile the code you should see the below error message.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-Kb6Wsfwi9s8/Tpw3Is3P9VI/AAAAAAAADp8/KH9d5ydsX48/s400/3.JPG" border="0" height="213" width="675" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the above error message diagram you can clearly see that the compiler says that it cannot implicitly convert type ‘double to int’ and are you &lt;b&gt;missing a cast&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;So how do we solve the above problem, simple by using CASTING.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Casting&lt;/b&gt;: - In simple words casting is nothing but converting data of one data type to another data type.&lt;br /&gt;&lt;br /&gt;In order that the above code works you need to specify the integer casting as show in the below code snippet.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;int i = (int) 45.12;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;When you compile the above code snippet you will find that the compilation has been done successfully like below diagram.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-GpaJoyAkZKU/Tpw3JHVwlvI/AAAAAAAADqI/bexDL3n4L5E/s400/4.JPG" border="0" height="160" width="573" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now the next question which will come to your mind , ‘int’ says he will not take decimals and now the above code is compiling and it’s trying to push decimal data in to INT , so what will get stored in to ‘i” variable.&lt;br /&gt;&lt;br /&gt;Now if we put a debug point and see the data in add watch as shown in the below images.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-quAbLtOvxDA/Tpw3JikPjMI/AAAAAAAADqY/_h955U57hok/s400/5.JPG" border="0" height="116" width="351" /&gt;&lt;/p&gt;&lt;img src="http://1.bp.blogspot.com/-OuO1ZXPl3FQ/Tpw3escIQQI/AAAAAAAADqg/dr4-GURPRDY/s400/6.JPG" border="0" height="254" width="343" /&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://2.bp.blogspot.com/-6NI03eeZ1Y0/Tpw3etnBcII/AAAAAAAADqs/Te2z_Boumls/s400/7.JPG" border="0" height="99" width="496" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;You can clearly see that the value of “i” variable is 45. Which means the fraction part has been eliminated: in other words there has been data loss.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;In other words when we do casting there can be loss of data.&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Following is the video on regular expressions for preparation on .NET: -&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/C2zm0roE-Uc?hd=1"&gt;&lt;img src="http://4.bp.blogspot.com/-7mzKTvdCR9M/Tpw3e-oazBI/AAAAAAAADq0/-VFq5TQLqrA/s400/8.JPG" border="0" height="292" width="470" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Click and view for more &lt;a target="_blank" href="http://www.questpond.com/"&gt;C# and .NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;View more author’s &lt;a target="_blank" href="http://questpond.blog.com/2011/10/17/c-and-net-interview-questions-show-us-the-need-of-casting-in-c-what-is-casting/"&gt;C# and .NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-8777942674207719960?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/8777942674207719960/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=8777942674207719960' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8777942674207719960'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8777942674207719960'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/c-and-net-interview-questions-what-is.html' title='C# and .NET interview questions: - What is the need of Casting in C#? What is casting?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-W5UNzaUuOCY/Tpw3IO9UX3I/AAAAAAAADpk/is86FFWIhvw/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-4378560587899583665</id><published>2011-10-14T10:20:00.000-07:00</published><updated>2011-10-14T10:40:26.490-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tracing'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>ASP.NET interview questions: - Can you explain the concept of trace listener?</title><content type='html'>&lt;p&gt;‘Tracelistener’ are objects that get tracing information from the trace class&lt;br /&gt;and they output the data to some medium. For instance you can see from the&lt;br /&gt;figure ‘TraceListener’ how it listens to the trace object and outputs the same&lt;br /&gt;to UI, File or a windows event log. There are three different types of&lt;br /&gt;‘tracelistener’ first is the ‘defaulttracelistener’ (this outputs the data to&lt;br /&gt;UI), second is ‘textwritertracelistener’ (this outputs to a file) and the final&lt;br /&gt;one is ‘Eventlogtracelistener’ which outputs the same to a windows event log.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://3.bp.blogspot.com/-o11oGwTNfCs/TphwJIPM1bI/AAAAAAAADpA/OSjrcHv3fhQ/s400/1.JPG" border="0" height="200" width="448" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Figure: -Trace listeners&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;Below is a snap shot for ‘textwritertracelistener’ and ‘eventlogtracelistener’. Using ‘textwritertracelistener’ we have forwarded the trace’s to ‘ErrorLog.txt’ file and in the second snippet we have used the ‘Eventlogtracelistener’ to forward the trace’s to windows event log.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://4.bp.blogspot.com/-tiaLZB_7U6Y/TphwJdRsyfI/AAAAAAAADpM/rstwFCn812U/s400/2.JPG" border="0" height="172" width="676" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Figure: - Tracelistener in action&lt;br /&gt;&lt;br /&gt;See the following video on Web.config transformation as follows: -&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/43F_hpna5WY?hd=1"&gt;&lt;img src="http://2.bp.blogspot.com/-0Dvs-AM9gtk/TphwJu9RVvI/AAAAAAAADpY/BmRMole4ULI/s400/3.JPG" border="0" height="293" width="470" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;See &lt;a target="_blank" href="http://www.questpond.com/"&gt;ASP.NET interview questions&lt;/a&gt; for interview preparation&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;/p&gt;View more author’s blog on&lt;a target="_blank" href="http://dotnetinter.livejournal.com/47466.html"&gt; ASP.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-4378560587899583665?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/4378560587899583665/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=4378560587899583665' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4378560587899583665'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4378560587899583665'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/aspnet-interview-questions-can-you.html' title='ASP.NET interview questions: - Can you explain the concept of trace listener?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-o11oGwTNfCs/TphwJIPM1bI/AAAAAAAADpA/OSjrcHv3fhQ/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-6838443024990106191</id><published>2011-10-13T06:21:00.000-07:00</published><updated>2011-10-13T06:59:57.504-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Cascading Style Sheets'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='CSS'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>ASP.NET interview questions: - What is CSS (Cascading Style Sheet) and how to create a CSS in ASP.NET?</title><content type='html'>&lt;p&gt;&lt;b&gt;CSS (Cascading Style Sheet)&lt;/b&gt;: - Cascading Style Sheets (CSS) is a style sheet language used to describe the presentation semantics (the look and formatting) of a document written in a markup language.&lt;br /&gt;&lt;br /&gt;In simple words &lt;b&gt;CSS (Cascading Style Sheet)&lt;/b&gt; is used to apply layout and visual style of elements.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;CSS (Cascading Style Sheet)&lt;/b&gt; is supported by almost all the browsers.&lt;br /&gt;&lt;br /&gt;Now, let’s create a simple example to see how exactly we can add a &lt;b&gt;CSS (Cascading Style Sheet)&lt;/b&gt; file in your ASP.NET application.&lt;br /&gt;&lt;br /&gt;In order to see it practically just follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1&lt;/b&gt;: - Create a simple ASP.NET web application for that just &lt;b&gt;go to&lt;/b&gt;  &amp;gt;&amp;gt; &lt;b&gt;File&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;New&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Project&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Web&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Select&lt;/b&gt; &lt;b&gt;ASP.NET Empty Web Application.&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;img src="http://3.bp.blogspot.com/-fK3NmXjfLAo/TpbmEvwUr_I/AAAAAAAADnI/3e1RJetexXU/s400/1.JPG" border="0" height="140" width="560" /&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://3.bp.blogspot.com/-wyUE_eZuvMI/TpbmE6LXwWI/AAAAAAAADnQ/2yA7EHaNT5I/s400/2.JPG" border="0" height="42" width="396" /&gt;&lt;b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step2&lt;/b&gt;: - Now add a simple &lt;b&gt;WebForm&lt;/b&gt; page in to your Web Application for that just &lt;b&gt;go to&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Solution Explorer&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Right Click on your Project &lt;/b&gt;&amp;gt;&amp;gt; &lt;b&gt;Add&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;New Item&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Select WebForm.&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://1.bp.blogspot.com/-MqxENg9fLAA/TpbmFEuE3tI/AAAAAAAADng/-R8ys1-LrPo/s400/3.JPG" border="0" height="44" width="396" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;After adding the WebForm page in to your application, now design your page like below diagram.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;img src="http://1.bp.blogspot.com/-2jTwdksw06g/TpbmFkeCMEI/AAAAAAAADns/9hZderWg_9U/s400/4.JPG" border="0" height="233" width="383" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;Step3&lt;/b&gt;: - This is the most important step while using the &lt;b&gt;CSS (Cascading Style Sheet)&lt;/b&gt;, in this step we just need to add a style sheet for that just &lt;b&gt;go to&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Solution Explorer&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Right Click on your Project&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Add&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;New Item&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Select Style Sheet.&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://3.bp.blogspot.com/-qwMq3paiiSA/TpbmGE8-m8I/AAAAAAAADn4/Y1t2f3WPCmU/s400/5.JPG" border="0" height="43" width="418" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, let us assume that we have change the background color and text color of the &lt;b&gt;Button control &lt;/b&gt;and the &lt;b&gt;TextBox control&lt;/b&gt;. In order to achieve the above point we have to add below code snippet in to your &lt;b&gt;StyleSheet1.css&lt;/b&gt;  file.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;.buttonInsert {color:Black;background-color:Green;}&lt;br /&gt;.buttonDelete {color:Black;background-color:Red;}&lt;br /&gt;.buttonUpdate {color:Black;background-color:Yellow;}&lt;br /&gt;.text {color:Black;background-color:Blue;}&lt;/pre&gt;&lt;br /&gt;In the above code snippet you can clearly see that I have created three&lt;b&gt; different styles for the button control&lt;/b&gt; and a single text style for the&lt;b&gt; TextBox control.&lt;/b&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;Step4&lt;/b&gt;: - Now, let’s see how exactly we can use &lt;b&gt;CSS&lt;/b&gt; in to your Web Application. &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://1.bp.blogspot.com/-NotAy5-7FkA/TpbmWQ3rkXI/AAAAAAAADoE/iKqK4MyZPXY/s400/6.JPG" border="0" height="429" width="628" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, when you run your web application you will see the result like below diagram.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://1.bp.blogspot.com/--hrcjgkIs5g/TpbmWc9nAbI/AAAAAAAADoQ/Q6GUNK6dW_c/s400/7.JPG" border="0" height="242" width="425" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the above diagram of the result you can clearly see the effect of the CSS declared on the described controls.&lt;br /&gt;&lt;br /&gt;Similarly, you can doo a lot with the &lt;b&gt;CSS (Cascading Style Sheet) &lt;/b&gt;to make your page &lt;b&gt;attractive and helpful&lt;/b&gt; to the user.&lt;br /&gt;&lt;br /&gt;See the following video on questions asked in C# and .NET interviews: -&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/pC3aLkf_A98?hd=1"&gt;&lt;img src="http://1.bp.blogspot.com/-lcjJJUZvhAA/TpbmWkEqCWI/AAAAAAAADoc/IM5EKAzKmHc/s400/8.JPG" border="0" height="274" width="469" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get more materials on &lt;a target="_blank" href="http://www.questpond.com/"&gt;ASP.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;See more stuffs on author’s blog for &lt;a target="_blank" href="http://dotnetinterviewquestion.wordpress.com/2011/10/13/asp-net-interview-questions-can-you-explain-css-cascading-style-sheet-and-how-to-create-a-css-in-asp-net/"&gt;ASP.NET interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-6838443024990106191?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/6838443024990106191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=6838443024990106191' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/6838443024990106191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/6838443024990106191'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/aspnet-interview-questions-what-is-css.html' title='ASP.NET interview questions: - What is CSS (Cascading Style Sheet) and how to create a CSS in ASP.NET?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-fK3NmXjfLAo/TpbmEvwUr_I/AAAAAAAADnI/3e1RJetexXU/s72-c/1.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5318373623707183714</id><published>2011-10-12T06:34:00.000-07:00</published><updated>2011-10-12T06:55:14.942-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='LINQ interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><category scheme='http://www.blogger.com/atom/ns#' term='LINQ'/><category scheme='http://www.blogger.com/atom/ns#' term='Entity framework'/><title type='text'>LINQ interview questions: -What is the difference between LINQ to SQL and Entity framework?</title><content type='html'>Following is the LINQ interview questions asked in an interview: -&lt;br /&gt;&lt;p&gt;&lt;br /&gt;• LINQ to SQL is good for rapid development with SQL Server. EF is for enterprise scenarios and works with SQL server as well as other databases.&lt;br /&gt;&lt;br /&gt;• LINQ maps directly to tables. One LINQ entity class maps to one table. EF has a conceptual model and that conceptual model map to storage model via mappings. So one EF class can map to multiple tables or one table can map to multiple classes.&lt;br /&gt;&lt;br /&gt;• LINQ is more targeted towards rapid development while EF is for enterprise level where the need is to develop loosely coupled framework.&lt;br /&gt;&lt;br /&gt;View the following video on calling a stored procedure using LINQ: -&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/rL4tqiaDwmM"&gt;&lt;img src="http://1.bp.blogspot.com/-V0dA4riApxo/TpWX2qDLLYI/AAAAAAAADm8/5RlpmpvPi2A/s400/1.JPG" border="0" height="291" width="471" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;See more &lt;a target="_blank" href="http://www.questpond.com/"&gt;LINQ interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Visit author’s more &lt;a target="_blank" href="http://www.dotnetinterviewquestions.in/article_linq-interview-questions:-how-does-linq-to-sql-differ-from-entity-framework_56.html"&gt;LINQ interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5318373623707183714?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5318373623707183714/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5318373623707183714' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5318373623707183714'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5318373623707183714'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/linq-interview-questions-what-is.html' title='LINQ interview questions: -What is the difference between LINQ to SQL and Entity framework?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-V0dA4riApxo/TpWX2qDLLYI/AAAAAAAADm8/5RlpmpvPi2A/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-6887183214225826757</id><published>2011-10-12T00:14:00.000-07:00</published><updated>2011-10-12T00:14:24.836-07:00</updated><title type='text'>c# and .NET interview question :- How to check if data is of a proper da...</title><content type='html'>&lt;iframe width="480" height="270" src="http://www.youtube.com/embed/a4-sX2MAJo8?fs=1" frameborder="0" allowFullScreen=""&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;br /&gt;For more video and articles visit &lt;a href="http://www.questpond.com"&gt;http://www.questpond.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-6887183214225826757?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/6887183214225826757/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=6887183214225826757' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/6887183214225826757'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/6887183214225826757'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/c-and-net-interview-question-how-to.html' title='c# and .NET interview question :- How to check if data is of a proper da...'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/a4-sX2MAJo8/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-8728333818322648799</id><published>2011-10-11T23:17:00.000-07:00</published><updated>2011-10-11T23:17:54.554-07:00</updated><title type='text'>What is volatile keyword , c#  and .NET interview questions ?</title><content type='html'>&lt;iframe width="480" height="270" src="http://www.youtube.com/embed/DZUXDSEuqek?fs=1" frameborder="0" allowFullScreen=""&gt;&lt;/iframe&gt;&lt;br /&gt;For more videos and article visit &lt;a href="http://questpond.com"&gt;http://www.questpond.com &lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-8728333818322648799?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/8728333818322648799/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=8728333818322648799' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8728333818322648799'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8728333818322648799'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/what-is-volatile-keyword-c-and-net.html' title='What is volatile keyword , c#  and .NET interview questions ?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/DZUXDSEuqek/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-7194961565539145833</id><published>2011-10-11T06:23:00.000-07:00</published><updated>2011-10-11T06:38:52.316-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Httphandlers'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='HttpModules'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>ASP.NET interview questions: - What are Httphandlers and HttpModules and difference between them?</title><content type='html'>&lt;p&gt;Differences between Httphandlers and HttpModules are as follows: -&lt;br /&gt;&lt;br /&gt;Handlers and modules helps you inject pre-processing logic before the ASP.NET&lt;br /&gt;request reaches the website.&lt;br /&gt;&lt;br /&gt;For instance, before your request reaches any resource you would like to check&lt;br /&gt;if the user has been authenticated or not.&lt;br /&gt;&lt;br /&gt;Httphandlers is an extension based processor. In other words the pre-processing&lt;br /&gt;logic is invoked depending on file extensions.&lt;br /&gt;&lt;br /&gt;Httpmodule is an event based processor. In other words ASP.NET emits lot of&lt;br /&gt;event like BeginRequest, AuthenticateRequest etc, we can write logic in those&lt;br /&gt;events using Httpmodule.&lt;br /&gt;&lt;br /&gt;View the following video on optimistic locking: -&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/BzJ77ZypU8s?hd=1"&gt;&lt;img src="http://2.bp.blogspot.com/-RkCkMWd0itM/TpRDgCV3gqI/AAAAAAAADmw/LNrjYlMOWQI/s400/1.JPG" border="0" height="291" width="462" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;View other &lt;a target="_blank" href="http://www.questpond.com/"&gt;ASP.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Get author’s more &lt;a target="_blank" href="http://dotnetinter.livejournal.com/46669.html"&gt;ASP.NET interview questions&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-7194961565539145833?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/7194961565539145833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=7194961565539145833' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/7194961565539145833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/7194961565539145833'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/aspnet-interview-questions-what-are.html' title='ASP.NET interview questions: - What are Httphandlers and HttpModules and difference between them?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-RkCkMWd0itM/TpRDgCV3gqI/AAAAAAAADmw/LNrjYlMOWQI/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-8259887677067331990</id><published>2011-10-10T06:27:00.000-07:00</published><updated>2011-10-10T06:46:55.276-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Variable data'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>.NET interview questions: - How to swap two variable data without using third  variable?</title><content type='html'>&lt;p&gt;A &lt;a target="_blank" href="http://www.questpond.com/demo.html"&gt;.NET interview questions&lt;/a&gt; especially for fresher where the interviewer asks to check skills&lt;br /&gt;and many of the junior developer fails to answer this question, which is very&lt;br /&gt;sad.&lt;br /&gt;&lt;br /&gt;So, let’s create a sweet and simple example to see how exactly we can swap the  two variables data without using third variable.&lt;br /&gt;&lt;br /&gt;Before we go ahead and create an example of swapping two variables data let first see how we can swap two variable data using the third variable and later we will create an example for swapping two variables data without using third variable.&lt;br /&gt;&lt;br /&gt;In order to see it practically you just need to follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1&lt;/b&gt;: - create a new Console Application for that just go to &amp;gt;&amp;gt; &lt;b&gt;File&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;New&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Project&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Windows&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Select Console Application.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-LNRg5BKehnE/TpLy-KNv4wI/AAAAAAAADmI/8h8GMLwcOCo/s400/1.JPG" border="0" height="140" width="560" /&gt;&lt;/p&gt;&lt;img src="http://1.bp.blogspot.com/-2o_xoya4KuY/TpLy-Xf3oiI/AAAAAAAADmQ/WD7g3xAK0RA/s400/2.JPG" border="0" height="41" width="354" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step2&lt;/b&gt;: - Now simply just add the below code in to your program.cs file of your Console Application.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class Program&lt;br /&gt;{&lt;br /&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;int a = 10;// Created int Variable a with value =10.&lt;br /&gt;int b = 5;// Created int Variable b with value =5.&lt;br /&gt;int temp = 0;// Creted a temp variable.&lt;br /&gt;temp = a;//Passing the value of a to temp.&lt;br /&gt;a = b;//passing the value of b to a.&lt;br /&gt;b = temp;//pasiing the value of temp to b.&lt;br /&gt;Console.WriteLine("The Value Of Variable a is:"+a);&lt;br /&gt;Console.WriteLine("The Value Of Variable b is:" +b);&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;In the above code snippet you can clearly see that I have used the third variable to swap the two variables values.&lt;br /&gt;&lt;p&gt;Now, simply just run your application and you will see the result like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-6u-UXfUGK2E/TpLy-rF6V2I/AAAAAAAADmY/d6LqNHKaS50/s400/3.JPG" border="0" height="107" width="463" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step3&lt;/b&gt;: - Now, let’s see an example for swapping two variables value without using third variable.&lt;br /&gt;&lt;br /&gt;Below is the code snippet for the same.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class Program&lt;br /&gt;{&lt;br /&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;int a = 10;// Created int Variable a with value =10.&lt;br /&gt;int b = 5;// Created int Variable b with value =5.&lt;br /&gt;a = a + b;&lt;br /&gt;b = a - b;&lt;br /&gt;a = a - b;&lt;br /&gt;Console.WriteLine("The Value Of Variable a is:"+a);&lt;br /&gt;Console.WriteLine("The Value Of Variable b is:" +b);&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;In the above code snippet you can clearly see that now I have not used the third variable temp to swap the value of two variables instead I have just added the few line of code like below code lines.&lt;br /&gt;&lt;p&gt;a = a + b;&lt;br /&gt;&lt;br /&gt;b = a - b;&lt;br /&gt;&lt;br /&gt;a = a - b;&lt;br /&gt;&lt;br /&gt;Now, simply just run your application and will see the result like below  diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-sZQJjfRB0mg/TpLy-j3lL4I/AAAAAAAADmg/mRjcr26FEP8/s400/4.JPG" border="0" height="134" width="424" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;See the following video on use of shadowing done in C#: -&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/xmjOPCnSE30?hd=1"&gt;&lt;img src="http://3.bp.blogspot.com/-UiWSkgLe5ls/TpLy-19rC8I/AAAAAAAADmo/DTi5j48wYWU/s400/5.JPG" border="0" height="293" width="470" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Avail from the link more &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt; for preparation.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Refer author’s other blog for complete &lt;a target="_blank" href="http://questpond.blog.com/2011/10/10/net-interview-questions-various-ways-to-swap-two-variable-data-without-using-third-variable/"&gt;.NET interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-8259887677067331990?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/8259887677067331990/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=8259887677067331990' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8259887677067331990'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8259887677067331990'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/net-interview-questions-how-to-swap-two.html' title='.NET interview questions: - How to swap two variable data without using third  variable?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-LNRg5BKehnE/TpLy-KNv4wI/AAAAAAAADmI/8h8GMLwcOCo/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5560201235889578373</id><published>2011-10-09T07:27:00.000-07:00</published><updated>2011-10-09T10:19:00.818-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='XML'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Server interview questions: - How to convert a Table Data in to XML format in SQL Server?</title><content type='html'>This is one of the typical&lt;a target="_blank" href="http://www.questpond.com/"&gt; SQL Server interview questions&lt;/a&gt; and also the favorable question of the&lt;b&gt; interviewers&lt;/b&gt;. The interviewers ask this question to check your skills on converting the table data in to &lt;b&gt;XML&lt;/b&gt; &lt;b&gt;format&lt;/b&gt; but many of your developer friends fails to answer this question.&lt;br /&gt;&lt;p&gt;Below is the syntax of how to convert &lt;b&gt;table data&lt;/b&gt; in to &lt;b&gt;XML format.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Syntax: - Select * From &lt;b&gt;[TableName] &lt;/b&gt;For XML Path&lt;br /&gt;&lt;br /&gt;So, let demonstrate a sweet and simple example to see how exactly we can convert&lt;br /&gt;table data in to XML format using a simple query.&lt;br /&gt;&lt;br /&gt;Assume that we have the following Customer’s table with their respective data&lt;br /&gt;types and data.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-EtXjPlmBJhE/TpGvdh3g4ZI/AAAAAAAADlg/HdVxpVKoDss/s400/1.JPG" border="0" height="139" width="344" /&gt;&lt;/p&gt;&lt;img src="http://2.bp.blogspot.com/-6AV3rXn-S1g/TpGvdhuEqTI/AAAAAAAADlo/cqcu-RQLDHE/s400/2.JPG" border="0" height="119" width="327" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Now, let’s create a simple query to obtain your required result.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Query&lt;/b&gt;: -&lt;br /&gt;&lt;br /&gt;Select * from &lt;b&gt;Customer&lt;/b&gt; For XML Path&lt;br /&gt;&lt;br /&gt;As soon as you execute the &lt;b&gt;above query &lt;/b&gt;you will see the result like below&lt;br /&gt;diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-G2KeQAXKvk4/TpGvd1zMBZI/AAAAAAAADlw/EpWnxOaSG9Q/s400/3.JPG" border="0" height="121" width="345" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, when you click on the link you will see the &lt;b&gt;XML&lt;/b&gt; result like below  diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-7iGYntT74yY/TpGveMnrLiI/AAAAAAAADl4/PYv5LPCssPo/s400/4.JPG" border="0" height="465" width="409" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the above diagram you can clearly see that now your table data has been&lt;br /&gt;successfully &lt;b&gt;converted&lt;/b&gt; in to the &lt;b&gt;XML format.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;See the following video on Basics SQL Server - Query Plan, Logical/Physical&lt;br /&gt;operators as follows: -&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/ZgD3o_zrEe0"&gt;&lt;img src="http://3.bp.blogspot.com/-KVg00o6hMRw/TpGveNxLEHI/AAAAAAAADmA/Hkak0ofGPto/s400/5.JPG" border="0" height="380" width="592" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get more materials on&lt;a target="_blank" href="http://www.questpond.com/"&gt; SQL Server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;See more stuffs on author’s blog for &lt;a target="_blank" href="http://questpond.over-blog.com/article-sql-server-interview-questions-vatious-ways-to-convert-a-table-data-in-to-xml-format-in-sql-serve-86226800.html"&gt;SQL Server interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5560201235889578373?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5560201235889578373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5560201235889578373' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5560201235889578373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5560201235889578373'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/sql-server-interview-questions-how-to.html' title='SQL Server interview questions: - How to convert a Table Data in to XML format in SQL Server?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-EtXjPlmBJhE/TpGvdh3g4ZI/AAAAAAAADlg/HdVxpVKoDss/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-2132291560135448861</id><published>2011-10-07T06:08:00.000-07:00</published><updated>2011-10-07T06:52:22.135-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dataset'/><category scheme='http://www.blogger.com/atom/ns#' term='Merge'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Grid view'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>ASP.NET interview questions: - How to merge two DataSet in to a Single GridView in ASP.NET?</title><content type='html'>&lt;p&gt;&lt;br /&gt;This is not a much asked  &lt;a target="_blank" href="http://www.questpond.com/"&gt;ASP.NET Interview questions&lt;/a&gt; but this question will definitely boost your  practical knowledge.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Merge&lt;/b&gt;: - merge is one the method of &lt;b&gt;DataSet&lt;/b&gt;. The merge function is  basically used when we have a parent child relationship between the tables.&lt;br /&gt;&lt;br /&gt;So let’s create a simple example to see how exactly dataset &lt;b&gt;merge&lt;/b&gt;  &lt;b&gt;function&lt;/b&gt; helps us to &lt;b&gt;merge&lt;/b&gt; two dataset table in to a single &lt;b&gt;GridView&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Assume that we have the following two tables with their respective &lt;b&gt;data type&lt;/b&gt;  and &lt;b&gt;name&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-RAcz-ee9in0/To76tIAohGI/AAAAAAAADkQ/7KpbxO49cgs/s400/1.JPG" border="0" height="139" width="344" /&gt;&lt;/p&gt;&lt;img src="http://2.bp.blogspot.com/-O-1JNf7lAWs/To76tZ1EKcI/AAAAAAAADkY/X6u_rMc1o5M/s400/2.JPG" border="0" height="156" width="343" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Now, add some data to both the tables like below diagrams.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://4.bp.blogspot.com/-CncFWiBXZHE/To76tSv2P4I/AAAAAAAADkg/gtz4X-DaSvo/s400/3.JPG" border="0" height="150" width="348" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://2.bp.blogspot.com/-K98WVkYX74A/To76tgPvD9I/AAAAAAAADko/DdD3ThZEv5c/s400/4.JPG" border="0" height="150" width="446" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, let’s create a small and simple ASP.NET application to understand the  function of DataSet merge practically.&lt;br /&gt;&lt;br /&gt;In order to see it practically just follow the following steps.&lt;/p&gt;&lt;b&gt;Step1&lt;/b&gt;: - create an &lt;b&gt;ASP.NET Empty Web Application&lt;/b&gt; for that just&lt;b&gt; go&lt;/b&gt; &lt;b&gt;to&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;File&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;New&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Project&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Windows&lt;/b&gt; &amp;gt;&amp;gt; Select ASP.NET Empty Web Application.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-c0VbnuI-Fck/To76tpO8cEI/AAAAAAAADkw/UFcdU7iRDh0/s400/5.JPG" border="0" height="140" width="560" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://2.bp.blogspot.com/-m-ZLj-Ym33s/To79IcEIgII/AAAAAAAADk4/CgTmn1tsN1U/s400/6.JPG" border="0" height="46" width="394" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step2&lt;/b&gt;: - now, just add a Web Form in to your Application for that just&lt;b&gt;  go to&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Solution Explorer&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Right Click on the project name&lt;/b&gt;  &amp;gt;&amp;gt; &lt;b&gt;Add&lt;/b&gt; &amp;gt;&amp;gt; New Item &amp;gt;&amp;gt; &lt;b&gt;Select ASP.NET Empty Web Application.&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://1.bp.blogspot.com/-O-ce9R_iAKM/To79Io_CS_I/AAAAAAAADlA/_58Dve0vAQw/s400/7.JPG" border="0" height="43" width="365" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step3&lt;/b&gt;: - Now simply add a &lt;b&gt;GridView Control&lt;/b&gt; on the &lt;b&gt;WebForm1.aspx page.&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://3.bp.blogspot.com/-TjW_Uuz_dRM/To79Is0UnUI/AAAAAAAADlI/SpmZeBg6EoQ/s400/8.JPG" border="0" height="224" width="274" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step4&lt;/b&gt;: - Now, just simply add the below code snippet in to your  &lt;b&gt;WebForm1.aspx.cs file&lt;/b&gt;.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;//Import the below namespaces first.&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Data.SqlClient;&lt;br /&gt;using System.Configuration;&lt;br /&gt;&lt;br /&gt;namespace MergeTablesInDataSet&lt;br /&gt;{&lt;br /&gt;public partial class WebForm1 : System.Web.UI.Page&lt;br /&gt;{&lt;br /&gt;//Define your own Connectionstring here.&lt;br /&gt;string str = ConfigurationManager.AppSettings["ConnectionString"];&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;//Just call the LoadData() method here.&lt;br /&gt;LoadData();&lt;br /&gt;}&lt;br /&gt;//Created a LoadData() method&lt;br /&gt;public void LoadData()&lt;br /&gt;{&lt;br /&gt;SqlConnection objConnection = new SqlConnection(str);&lt;br /&gt;objConnection.Open();&lt;br /&gt;SqlCommand objCommand = new SqlCommand();&lt;br /&gt;objCommand.CommandText = "select * from [dbo].[Customer]";&lt;br /&gt;objCommand.Connection = objConnection;&lt;br /&gt;objCommand.ExecuteNonQuery();&lt;br /&gt;SqlDataAdapter objadapter = new SqlDataAdapter(objCommand);&lt;br /&gt;//Create a DataSet which has [dbo].[Customer] table data.&lt;br /&gt;DataSet objdataset = new DataSet();&lt;br /&gt;objadapter.Fill(objdataset);&lt;br /&gt;SqlCommand objcommand1 = new SqlCommand();&lt;br /&gt;objcommand1.CommandText = "select * from [dbo].[Order]";&lt;br /&gt;objcommand1.Connection = objConnection;&lt;br /&gt;objcommand1.ExecuteNonQuery();&lt;br /&gt;SqlDataAdapter adap1 = new SqlDataAdapter(objcommand1);&lt;br /&gt;//Create a DataSet which has [dbo].[Order] table data.&lt;br /&gt;DataSet dataset1 = new DataSet();&lt;br /&gt;adap1.Fill(dataset1);&lt;br /&gt;//Below is how exactly DataSet Merge Function is used.&lt;br /&gt;objdataset.Merge(dataset1);&lt;br /&gt;GridView1.DataSource = objdataset.Tables[0];&lt;br /&gt;GridView1.DataBind();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;If you have done with all the above steps now simply run your application and  will see the result like below diagram.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://3.bp.blogspot.com/-fhuvp6nA1fs/To79I6W3FRI/AAAAAAAADlQ/PpfLWMKBxa0/s400/9.JPG" border="0" height="340" width="628" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;In the above diagram you can clearly see that both table’s &lt;b&gt;Customer&lt;/b&gt; and  the &lt;b&gt;Order&lt;/b&gt; table are now merged in to single GridView.&lt;br /&gt;&lt;/p&gt;View the following video on EO Fundamentals of Function Point Analysis: -&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/pa47ac8MSYE"&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-nbV20HE8Qjg/To79I4sez9I/AAAAAAAADlY/jQDvq4U71Y4/s400/10.JPG" border="0" height="281" width="434" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;See our more &lt;a target="_blank" href="http://www.questpond.com/"&gt;ASP.NET  interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;View author’s other &lt;a target="_blank" href="http://dotnetinterviewquestion.wordpress.com/2011/10/07/asp-net-interview-questions-explain-how-to-merge-two-dataset-in-to-a-single-gridview-in-asp-net/"&gt; ASP.NET interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-2132291560135448861?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/2132291560135448861/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=2132291560135448861' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2132291560135448861'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2132291560135448861'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/blog-post.html' title='ASP.NET interview questions: - How to merge two DataSet in to a Single GridView in ASP.NET?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-RAcz-ee9in0/To76tIAohGI/AAAAAAAADkQ/7KpbxO49cgs/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-3483467284597604244</id><published>2011-10-05T04:51:00.000-07:00</published><updated>2011-10-05T05:01:53.880-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Delegates'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>.NET interview questions: - What are delegate &amp; steps to create delegate?</title><content type='html'>&lt;p&gt;We can define delegate as an abstract strong pointer to a function or method. In&lt;br /&gt;other words we can create a pointer which points to a method or function and&lt;br /&gt;then pass that pointer wherever you wish and invoke the function / method.&lt;br /&gt;&lt;br /&gt;It is a 4 steps simple process for delegate creation:-&lt;br /&gt;&lt;br /&gt;1. First step is we need to declare a delegate.&lt;br /&gt;&lt;br /&gt;2. Then create an object reference for it.&lt;br /&gt;&lt;br /&gt;3. Pointing the reference towards a method.&lt;br /&gt;&lt;br /&gt;4. And finally we need to invoke the method through a delegate.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Below is the sample code snippet for the same.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;// Declare a delegate&lt;br /&gt;public delegate int PointToAdd(int p, int q);&lt;br /&gt;&lt;br /&gt;// Create a reference pointer&lt;br /&gt;PointToAdd objpointer = null;&lt;br /&gt;&lt;br /&gt;// Point to the method&lt;br /&gt;objpointer = Add;&lt;br /&gt;&lt;br /&gt;// Invoke the function/method&lt;br /&gt;objpointer.Invoke(60,70);&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;View video on Shadowing in OOPS as follows: -&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/xmjOPCnSE30?hd=1"&gt;&lt;img src="http://4.bp.blogspot.com/-7AsNOTiLpdo/ToxE-qpLU-I/AAAAAAAADkI/YlI9Flj0Exg/s400/1.JPG" border="0" height="294" width="473" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Avail from the link more&lt;a target="_blank" href="http://www.questpond.com/"&gt; .NET interview questions&lt;/a&gt; for preparation.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Refer author’s other blog for complete &lt;a target="_blank" href="http://www.dotnetinterviewquestions.in/article_net-interview-questions:-define-delegate-steps-to-create-delegate_51.html"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-3483467284597604244?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/3483467284597604244/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=3483467284597604244' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3483467284597604244'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3483467284597604244'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/net-interview-questions-what-are.html' title='.NET interview questions: - What are delegate &amp; steps to create delegate?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-7AsNOTiLpdo/ToxE-qpLU-I/AAAAAAAADkI/YlI9Flj0Exg/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-1665317216203821478</id><published>2011-10-04T06:21:00.000-07:00</published><updated>2011-10-04T06:51:23.644-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Keyword'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Volatile'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interivew Questions'/><title type='text'>.NET interview questions: - What is Volatile Keyword?</title><content type='html'>&lt;b&gt;Volatile Keyword&lt;/b&gt;: - The &lt;b&gt;Volatile keyword&lt;/b&gt; ensures that whichever the &lt;b&gt;variable data&lt;/b&gt; you are accessing currently is up to date or is sinking with main memory which is being updated.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;In other words you will use Volatile Keyword in scenarios when you are doing &lt;b&gt;&lt;br /&gt;multi-threading&lt;/b&gt; applications and especially when you are accessing &lt;b&gt;data&lt;/b&gt;&lt;br /&gt;which is being &lt;b&gt;updated&lt;/b&gt; concurrently by multiple threads.&lt;br /&gt;&lt;br /&gt;Now, let’s see a &lt;b&gt;scenario&lt;/b&gt; where the actual use of the &lt;b&gt;Volatile Keyword&lt;/b&gt; exists.&lt;br /&gt;&lt;br /&gt;In order to see it practically and understand the concept and the use of the &lt;b&gt;&lt;br /&gt;Volatile Keyword&lt;/b&gt; just follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1&lt;/b&gt;: - create a simple Console Application for that just go to &amp;gt;&amp;gt; &lt;b&gt;&lt;br /&gt;File&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;New&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Project&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Windows&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Select Console&lt;br /&gt;Application.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-oNlTPFgsBfU/TosIgwCB0PI/AAAAAAAADjY/ROvwxMBh7dw/s400/1.JPG" border="0" height="140" width="560" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://1.bp.blogspot.com/-_RB0GnSHoGI/TosIhCbXhXI/AAAAAAAADjg/YGZgUOUgQgU/s400/2.JPG" border="0" height="41" width="354" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step2&lt;/b&gt;: - Import the below &lt;b&gt;Namespace&lt;/b&gt;.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;using System.Threading;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step3&lt;/b&gt;: - Now, just simply add the below &lt;b&gt;code snippet&lt;/b&gt; in to your &lt;b&gt;Program.cs&lt;/b&gt; file of &lt;b&gt;Console Application.&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class Program&lt;br /&gt;{&lt;br /&gt;private bool _loop = true;&lt;br /&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;//Calling the SomeThread method in&lt;br /&gt;//MultiThreaded Manner.&lt;br /&gt;Program test1 = new Program();&lt;br /&gt;Thread obj = new Thread(SomeThread);&lt;br /&gt;obj.Start(test1);&lt;br /&gt;//Pauses for 20 ms&lt;br /&gt;Thread.Sleep(20);&lt;br /&gt;//Setting the loop value to false.&lt;br /&gt;test1._loop = false;&lt;br /&gt;Console.WriteLine("Step2 :- The Value is Set To False");&lt;br /&gt;}&lt;br /&gt;//Simple Method called SomeThread.&lt;br /&gt;private static void SomeThread(object o1)&lt;br /&gt;{&lt;br /&gt;Program o = (Program)o1;&lt;br /&gt;Console.WriteLine("Step1 :- Entered The Loop");&lt;br /&gt;//This will run untill the _loop value is true.&lt;br /&gt;while (o._loop)&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;Console.WriteLine("Step3 :- Exited The Loop");&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Let me just explain flow of the program, when you execute your program first&lt;br /&gt;the below code line will get executed.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;Program test1 = new Program();&lt;br /&gt;Thread obj = new Thread(SomeThread);&lt;br /&gt;obj.Start(test1);&lt;br /&gt;Thread.Sleep(20);&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Once the above line of thread is executed it should display us the below code of&lt;br /&gt;line which is inside the &lt;b&gt;SomeThread Method.&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;Program o = (Program)o1;&lt;br /&gt;Console.WriteLine("Step1 :- Entered The Loop");&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Now the below while loop will run continuously until the _loop value is set&lt;br /&gt;to false.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;while (o._loop)&lt;br /&gt;{&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Now, the below line of code will get executed and the value of the _loop will  be set to false.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;test1._loop = false;&lt;br /&gt;Console.WriteLine("Step2 :- The Value is Set To False");&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Once the value of the _loop is set to false, now the while loop will get terminated and the below line of code will get executed.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;Console.WriteLine("Step3 :- Exited The Loop");&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step4&lt;/b&gt;: - now, just run the Console Application and you will see the result like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Note: - Please run your application in Release mode.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-rGJtUoSAIUM/TosIhCZX6LI/AAAAAAAADjo/DBPWLXnzwmg/s400/3.JPG" border="0" height="97" width="384" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the above diagram of output you can clearly see that the step3 has not been executed.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step5&lt;/b&gt;: - Now, just make necessary changes to the &lt;b&gt;program.cs&lt;/b&gt; file  like below code snippet.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-HTO7Kl0dd3A/TosIhBJaEBI/AAAAAAAADjw/6NEd8wKNTcY/s400/4.JPG" border="0" height="65" width="346" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class Program&lt;br /&gt;{&lt;br /&gt;private volatile bool _loop = true;&lt;br /&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;//Calling the SomeThread method in&lt;br /&gt;//MultiThreaded Manner.&lt;br /&gt;Program test1 = new Program();&lt;br /&gt;Thread obj = new Thread(SomeThread);&lt;br /&gt;obj.Start(test1);&lt;br /&gt;//Pauses for 20 ms&lt;br /&gt;Thread.Sleep(20);&lt;br /&gt;//Setting the loop value to false.&lt;br /&gt;test1._loop = false;&lt;br /&gt;Console.WriteLine("Step2 :- The Value is Set To False");&lt;br /&gt;}&lt;br /&gt;//Simple Method called SomeThread.&lt;br /&gt;private static void SomeThread(object o1)&lt;br /&gt;{&lt;br /&gt;Program o = (Program)o1;&lt;br /&gt;Console.WriteLine("Step1 :- Entered The Loop");&lt;br /&gt;//This will run untill the _loop value is true.&lt;br /&gt;while (o._loop)&lt;br /&gt;{&lt;br /&gt;}&lt;br /&gt;Console.WriteLine("Step3 :- Exited The Loop");&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Now, just your application and will find result like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-mzmrUUwT97Y/TosIhZtLHbI/AAAAAAAADj4/WS2fPK6i0Vo/s400/5.JPG" border="0" height="152" width="333" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Also see the following video on volatile keyword in C# and .NET: -&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/DZUXDSEuqek?hd=1"&gt;&lt;img src="http://4.bp.blogspot.com/-Y_adUvMQPGw/TosJ8Pq6oeI/AAAAAAAADkA/sfBDDzCEWHg/s400/6.JPG" border="0" height="294" width="474" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;View our other most important  &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;/p&gt;Visit author’s blog for more&lt;a target="_blank" href="http://dotnetinter.livejournal.com/45666.html"&gt; .NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-1665317216203821478?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/1665317216203821478/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=1665317216203821478' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1665317216203821478'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1665317216203821478'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/net-interview-questions-what-is.html' title='.NET interview questions: - What is Volatile Keyword?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-oNlTPFgsBfU/TosIgwCB0PI/AAAAAAAADjY/ROvwxMBh7dw/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-3818625609674461694</id><published>2011-10-03T10:01:00.000-07:00</published><updated>2011-10-03T10:53:00.519-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='regular expression'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>.NET interview questions: - How to check if data is of a proper data type?</title><content type='html'>&lt;p&gt;This is not one of the typical &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;,  but being as a .NET developer this can help you in some extent to check the  &lt;b&gt;data&lt;/b&gt; you have inserted as &lt;b&gt;input is of proper data type or not.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Many of the developer friends use &lt;b&gt;regular expression&lt;/b&gt; for this purpose but &lt;b&gt;regular expression&lt;/b&gt; will be too much for simpler &lt;b&gt;numeric&lt;/b&gt;  &lt;b&gt;validation&lt;/b&gt;, &lt;b&gt;regular&lt;/b&gt; &lt;b&gt;expression&lt;/b&gt; is good for complicated check like &lt;b&gt;Email address&lt;/b&gt; check or some kind of &lt;b&gt;complicated pattern&lt;/b&gt; of&lt;br /&gt;data.&lt;br /&gt;&lt;br /&gt;For simple data type where we just have to check whether the inputted data &lt;b&gt;&lt;br /&gt;isnumeric&lt;/b&gt; or proper &lt;b&gt;date validation&lt;/b&gt; for such kind of check we must&lt;br /&gt;have something simpler. For the same we have something called as &lt;b&gt;TryParse&lt;/b&gt;&lt;br /&gt;function in every data type.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;TryParse&lt;/b&gt;: - The &lt;b&gt;TryParse&lt;/b&gt; method is like the &lt;b&gt;Parse&lt;/b&gt; method, except the TryParse method does not throw an exception if the conversion fails. It &lt;b&gt;eliminates&lt;/b&gt; the need to use exception handling to test for a &lt;b&gt;FormatException&lt;/b&gt; in the event that is invalid and cannot be &lt;b&gt;successfully&lt;/b&gt;  parsed.&lt;br /&gt;&lt;br /&gt;Now, let’s see a small and simple demonstration to understand the concept of  using TryParse in much better way.&lt;br /&gt;&lt;br /&gt;In order to see it practically just follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1&lt;/b&gt;: - Create a new Project of Console Application for that just go to &amp;gt;&amp;gt; &lt;b&gt;File&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;New&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Project&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Windows&lt;/b&gt; &amp;gt;&amp;gt; Select &lt;b&gt;Console Application.&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-gtSPwtQnBms/Tonqp1lqqNI/AAAAAAAADho/0lCLjNXKLxY/s400/1.JPG" border="0" height="140" width="560" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://3.bp.blogspot.com/-3tNE7wxYHR4/Tonqp8cM3TI/AAAAAAAADhw/JSVSimGPqA4/s400/2.JPG" border="0" height="41" width="354" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step2&lt;/b&gt;: - Now, just add the below code snippet in the main class.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("Please Enter a Data To check is of proper DataType");&lt;br /&gt;string str = Console.ReadLine().ToString();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;In the above code snippet you can see that I am taking some &lt;b&gt;data&lt;/b&gt; from the Console.ReadLine() and I would like to check if the data entered is of “int (integer)” type or must be some type of numeric.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Now, let’s take a simple example to check whether the inputted data is numeric  or not.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, just simply add the below code snippet to check whether the entered data is&lt;br /&gt;of proper data type or not.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-9AAxT7L3Yio/TonqqE4TcbI/AAAAAAAADh4/3ADZzeQEqnM/s400/3.JPG" border="0" height="144" width="178" /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("Please Enter a Data To check is of proper DataType");&lt;br /&gt;string str = Console.ReadLine().ToString();&lt;br /&gt;int output = 0;&lt;br /&gt;bool isNumeric = int.TryParse(str, out output);&lt;br /&gt;if (isNumeric == true)&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("The Data You have entered is of proper DataType");&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("The Data You have entered is not of proper DataType");&lt;br /&gt;}&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;In the above code snippet you can see that I have simply created a bool  variable and have defined it as int.TryParse which will actually take the data  from the ((string str = Console.ReadLine().ToString();)) and if the &lt;b&gt;TryParse&lt;/b&gt;  function is successful to parse the data if it is numeric then the final result  will be stored inside the &lt;b&gt;output&lt;/b&gt; variable.&lt;br /&gt;&lt;br /&gt;Let me just try to explain the above mentioned point.&lt;br /&gt;&lt;br /&gt;If you have done pasting with the above code snippet now just simply run your&lt;br /&gt;application to see the resultant output.&lt;br /&gt;&lt;br /&gt;Before start executing your Console Application just place a small debug pointer&lt;br /&gt;on the below mentioned diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-doXnSXTtkmI/TonqqcJguII/AAAAAAAADiA/dBz4n0mmwGA/s400/4.JPG" border="0" height="120" width="461" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Now, when you run your application you will see the below output diagram.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://2.bp.blogspot.com/-GdzCedbso8Q/TonqqRtFW-I/AAAAAAAADiI/geR1kOtm1Ic/s400/5.JPG" border="0" height="113" width="417" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, let put a wrong data to check whether the &lt;b&gt;TryParse&lt;/b&gt; function is able to parse the data or it fails to do it.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://3.bp.blogspot.com/-LkjEDVdyaao/TonrOP7bvqI/AAAAAAAADiQ/9drW6u2f8qU/s400/6.JPG" border="0" height="114" width="417" /&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://4.bp.blogspot.com/--Osjp-N-cBU/TonrOApE9XI/AAAAAAAADiY/BbXv256WLSE/s400/7.JPG" border="0" height="69" width="482" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the above diagram you can clearly see that the &lt;b&gt;isNumeric&lt;/b&gt; &lt;b&gt;variable&lt;/b&gt;  value is &lt;b&gt;false&lt;/b&gt; because the &lt;b&gt;TryParse&lt;/b&gt; function unable to &lt;b&gt;parse&lt;/b&gt;  the data and when you will see data of output variable you will find data like  below diagram.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://1.bp.blogspot.com/-qsllPdUJ30U/TonrOTOM62I/AAAAAAAADig/NcztWqVHSkI/s400/8.JPG" border="0" height="65" width="488" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The below diagram is the output of the above mentioned data.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-sq3RcYvmVrY/TonrOitkufI/AAAAAAAADio/Q4ckifMe2sU/s400/9.JPG" border="0" height="102" width="444" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, let’s place a proper data and see the result of it.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;img src="http://4.bp.blogspot.com/-s-fCRFxmhCY/TonrO01R8KI/AAAAAAAADiw/8a2cDB11Qz8/s400/10.JPG" border="0" height="98" width="421" /&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://4.bp.blogspot.com/-mCgxfo5MMcU/Tonrd5IVvsI/AAAAAAAADi4/AF07esYsMMs/s400/11.JPG" border="0" height="60" width="457" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the above diagram you can clearly see that now the value of the isNumeric variable is true means the &lt;b&gt;TryParse&lt;/b&gt; function has successfully parse the data. Let also the value of the &lt;b&gt;output&lt;/b&gt; variable.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://4.bp.blogspot.com/-KRcpGqDUplg/TonreJzwjVI/AAAAAAAADjA/H8ilIOqUhHg/s400/12.JPG" border="0" height="71" width="440" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, you can see that the value of the &lt;b&gt;output&lt;/b&gt; variable as &lt;b&gt;123&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;The below is the result for the above entered data.&lt;/p&gt;&lt;img src="http://4.bp.blogspot.com/-ONeZtGk438c/TonreJTAQhI/AAAAAAAADjI/PoT8odgwjuA/s400/13.JPG" border="0" height="101" width="439" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Similarly, you can test for the other data type.&lt;br /&gt;&lt;br /&gt;See the following video on how to check if data is of a proper data type or not: -&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/a4-sX2MAJo8"&gt;&lt;img src="http://3.bp.blogspot.com/-b-1N4xWtGfc/TonreXWuQhI/AAAAAAAADjQ/k66nIMMh9q4/s400/14.JPG" border="0" height="294" width="472" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;See our more &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;View author’s other &lt;a target="_blank" href="http://questpond.over-blog.com/article-net-interview-questions-various-ways-to-check-if-data-is-of-a-proper-data-type-85748169.html"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-3818625609674461694?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/3818625609674461694/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=3818625609674461694' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3818625609674461694'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3818625609674461694'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/10/net-interview-questions-how-to-check-if.html' title='.NET interview questions: - How to check if data is of a proper data type?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-gtSPwtQnBms/Tonqp1lqqNI/AAAAAAAADho/0lCLjNXKLxY/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-6729194283796717247</id><published>2011-09-30T06:35:00.000-07:00</published><updated>2011-09-30T06:48:31.617-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>23 Important .Net Interview Question</title><content type='html'>How does performance increase by using generic collection ?&lt;br /&gt;&lt;br /&gt;What is the sequence in which ASP.NET page life cycle is executed ?&lt;br /&gt;&lt;p&gt;If you are said to improve .NET code performance what will you do ?&lt;/p&gt;How does “Dataset” differ from a “Data Reader”?&lt;br /&gt;&lt;p&gt;How does delegate differ from an event&lt;/p&gt;What is the difference between abstraction and encapsulation ?&lt;br /&gt;&lt;p&gt;If A class inherits from multiple interfaces and the interfaces have same  method names. How can we provide different implementation?.&lt;/p&gt;What is Polymorphism? How does VB.NET/C# achieve polymorphism?&lt;br /&gt;&lt;p&gt;Why can't we instantiate an abstract class?&lt;br /&gt;&lt;/p&gt;What is difference between out and ref in c#?&lt;br /&gt;&lt;p&gt;What is the difference between app.config, web.config and machine.config ?&lt;br /&gt;&lt;br /&gt;What are the different principle of OOPS?&lt;/p&gt;What is the difference between .NET 1.1,2.0,3.0,3.5 and 4.0 ?&lt;br /&gt;&lt;p&gt;What is the difference between class and structures ?&lt;/p&gt;What are Regex / regular expressions ?&lt;br /&gt;&lt;p&gt;What is the difference between Decorator and Adapter pattern?&lt;/p&gt;What is the difference between Object and class adapters?&lt;br /&gt;&lt;p&gt;How did you do unit testing in your project?&lt;/p&gt;Can you explain architecture of your project ?&lt;br /&gt;&lt;p&gt;What is the use of private constructor ?&lt;/p&gt;What coding standards did you followed your projects ?&lt;br /&gt;&lt;p&gt;What are the different types of assemblies? &lt;/p&gt;How does index makes search faster?&lt;br /&gt;&lt;p&gt; Also see another  &lt;a target="_blank" href="http://www.questpond.com/demo.html"&gt;C# &amp;amp; .Net  interview questions &lt;/a&gt;video on difference types of collection&lt;br /&gt;in .Net as follows-&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/hDykzD-3z8k"&gt;&lt;img src="http://4.bp.blogspot.com/-zscrJCO9fY0/ToXF0_td6BI/AAAAAAAADhg/zm-rpGvehQ0/s400/1.JPG" border="0" height="298" width="485" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;Please click here to see more &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;&lt;p&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Visit Authors blog for more &lt;a target="_blank" href="http://questpond.blog.com/2011/09/30/23-important-net-interview-question/"&gt;.NET  interview  questions&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt; &lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-6729194283796717247?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/6729194283796717247/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=6729194283796717247' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/6729194283796717247'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/6729194283796717247'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/23-important-net-interview-question.html' title='23 Important .Net Interview Question'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-zscrJCO9fY0/ToXF0_td6BI/AAAAAAAADhg/zm-rpGvehQ0/s72-c/1.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-6002058965034458619</id><published>2011-09-29T06:27:00.000-07:00</published><updated>2011-09-29T07:24:47.702-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>ASP.NET interview questions: - How to restrict users to upload a specified  file extension in ASP.NET?</title><content type='html'>&lt;p&gt;This is not one of the typical .NET interview questions but on knowledge aspect&lt;br /&gt;you will find this as interesting because while you are working in some of the&lt;br /&gt;IT company or project this situation can occur in front of you so at that time&lt;br /&gt;this might help you in some extent.&lt;br /&gt;&lt;br /&gt;So let’s see a small and simple example to understand it in better manner.&lt;br /&gt;&lt;br /&gt;In order to see it practically just follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1&lt;/b&gt;: - create a new project of ASP.NET for that just go to &amp;gt;&amp;gt; &lt;b&gt;File&lt;/b&gt;&lt;br /&gt;&amp;gt;&amp;gt; &lt;b&gt;New&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Project&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Web&lt;/b&gt; &amp;gt;&amp;gt; select &lt;b&gt;ASP.NET Empty Web&lt;br /&gt;Application.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-LvfIXaV152o/ToRyjfN2tWI/AAAAAAAADfY/E_XQ41YJjLk/s400/1.JPG" border="0" height="169" width="535" /&gt;&lt;/p&gt;&lt;img src="http://3.bp.blogspot.com/-_esZIoGKsMY/ToRyjmZG3MI/AAAAAAAADfg/DNtz7WkStUY/s400/2.JPG" border="0" height="44" width="370" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;Step2&lt;/b&gt;: - now, just simply add a Web form page in to your application for&lt;br /&gt;that just go to &amp;gt;&amp;gt; &lt;b&gt;Solution Explorer&lt;/b&gt; &amp;gt;&amp;gt;&lt;b&gt; Right click on the project&lt;br /&gt;name &lt;/b&gt;&amp;gt;&amp;gt; &lt;b&gt;Add&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;New Item&lt;/b&gt; &amp;gt;&amp;gt; Select &lt;b&gt;Web Form.&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://1.bp.blogspot.com/-z5BCr5pzqbg/ToRyjhCgTtI/AAAAAAAADfo/sFZm7dc0HwU/s400/3.JPG" border="0" height="43" width="378" /&gt;&lt;b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;b&gt;Step3&lt;/b&gt;: - Now Add a &lt;b&gt;FileUpload &lt;/b&gt;control and &lt;b&gt;Button&lt;/b&gt; control from the &lt;b&gt;ToolBox&lt;/b&gt; to the &lt;b&gt;WebForm.aspx&lt;/b&gt; Page.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://2.bp.blogspot.com/-WRCKkqJN8Pk/ToRyjypAaoI/AAAAAAAADfw/bOKUQU6GXJI/s400/4.JPG" border="0" height="223" width="291" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The &lt;b&gt;WebForm.aspx&lt;/b&gt; page should appear like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-XVd4tRd4QgQ/ToRykIjr9xI/AAAAAAAADf4/9bHY1JNtmmk/s400/5.JPG" border="0" height="153" width="392" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step4&lt;/b&gt;: - Now simply just add the below code snippet in to &lt;b&gt;WebForm1.aspx.cs&lt;/b&gt; file.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;protected void Button1_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;if ((FileUpload1.PostedFile != null) &amp;amp;&amp;amp; (FileUpload1.PostedFile.ContentLength &amp;gt; 0))&lt;br /&gt;{&lt;br /&gt;string filename = System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName);&lt;br /&gt;// The below line of code with take the extension of the selected file by the user.&lt;br /&gt;string extension = System.IO.Path.GetExtension(FileUpload1.PostedFile.FileName);&lt;br /&gt;&lt;br /&gt;// The below line of code is the location where the file will be saved.&lt;br /&gt;string location = Server.MapPath("UploadedFiles")+"\\"+filename;&lt;br /&gt;&lt;br /&gt;// The below “if” condition will see the whether the file is .docx&lt;br /&gt;or not and according to that the condition statement will execute.&lt;br /&gt;&lt;br /&gt;if (extension == ".docx")&lt;br /&gt;{&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;FileUpload1.PostedFile.SaveAs(location);&lt;br /&gt;Label2.Text = "The File has been successfully uploaded";&lt;br /&gt;}&lt;br /&gt;catch (Exception ex)&lt;br /&gt;{&lt;br /&gt;Label2.Text = "Error : " + ex.Message.ToString();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;Label2.Text = "Please Select a .docx file only";&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;Label2.Text = "Please Enter a File";&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;The above code snippet is for the &lt;b&gt;Button&lt;/b&gt; control for uploading the  selected file to the server and with the &lt;b&gt;extension&lt;/b&gt; condition.&lt;br /&gt;&lt;br /&gt;Once you have completed all the above steps just run your application to get a resultant result.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-ZpJKt9UjwnQ/ToRz8raerwI/AAAAAAAADgo/0xL1Gb0fjL4/s400/6.JPG" border="0" height="123" width="411" /&gt;&lt;br /&gt;&lt;br /&gt;The above diagram is the running page that we have created.&lt;br /&gt;&lt;br /&gt;Now, let’s first select a different extension file and see that the file is  successfully added to the server or not.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-knjYtxzT9bc/ToRz8xTzQiI/AAAAAAAADgw/67ElMdOyZnM/s400/7.JPG" border="0" height="392" width="506" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Once you have selected the file now just click on the &lt;b&gt;upload&lt;/b&gt; button.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-Vs25O5thkxE/ToRz9IDKVII/AAAAAAAADg4/stF9coRZKoM/s400/8.JPG" border="0" height="120" width="404" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As we have not selected the specified file extension, we expect that the file&lt;br /&gt;should not be saved and an error of block statement should get executed like&lt;br /&gt;below diagram.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://1.bp.blogspot.com/-u5CwWr1kWT0/ToRz9cKl-bI/AAAAAAAADhA/Yj0HgYFQN1o/s400/9.JPG" border="0" height="202" width="413" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The above diagram proves the point that the user can only select the specified&lt;br /&gt;file extension.&lt;br /&gt;&lt;br /&gt;Now, let us select a .docx file as we have specified in the code of statement&lt;br /&gt;and see that it is getting saved to the server or not.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://3.bp.blogspot.com/-dvt54a_COOY/ToRz9j0i1VI/AAAAAAAADhI/xkX9ynQIXFo/s400/10.JPG" border="0" height="303" width="505" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, just click the upload button to upload the selected file to the server and  if everything goes right you will see the result like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;img src="http://3.bp.blogspot.com/-QLqo_HtMLBk/ToR0LpFyNxI/AAAAAAAADhQ/NgDDsqKt7rM/s400/11.JPG" border="0" height="127" width="412" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;See the following video on Authentication and Authorization: -&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/gG3ljmMmeM0?hd=1"&gt;&lt;img src="http://2.bp.blogspot.com/-PmiBAHBEhIw/ToR0L3w8waI/AAAAAAAADhY/sAKPnc8AY_c/s400/12.JPG" border="0" height="291" width="465" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get more learning materials for &lt;a target="_blank" href="http://www.questpond.com/"&gt;ASP.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;View author’s other article on &lt;a target="_blank" href="http://dotnetinterviewquestion.wordpress.com/2011/09/29/asp-net-interview-questions-show-us-how-to-restrict-users-to-upload-a-specified-file-extension-in-asp-net/"&gt; ASP.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-6002058965034458619?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/6002058965034458619/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=6002058965034458619' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/6002058965034458619'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/6002058965034458619'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/aspnet-interview-questions-how-to_29.html' title='ASP.NET interview questions: - How to restrict users to upload a specified  file extension in ASP.NET?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-LvfIXaV152o/ToRyjfN2tWI/AAAAAAAADfY/E_XQ41YJjLk/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-7161238089008905856</id><published>2011-09-28T06:45:00.000-07:00</published><updated>2011-09-28T07:15:49.371-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>ASP.NET interview questions: - How to Browse and Upload a file in ASP.NET?</title><content type='html'>&lt;p&gt;This not one of those most asked ASP.NET questions , but yes sometimes&lt;br /&gt;interviewer starts getting in to practical things to understand how good you&lt;br /&gt;are as a developer.&lt;br /&gt;&lt;br /&gt;So let’s see a small and simple example to understand it in better manner.&lt;br /&gt;&lt;br /&gt;In order to see it practically just follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1&lt;/b&gt;: - create a new project of ASP.NET for that just go to &amp;gt;&amp;gt; &lt;b&gt;&lt;br /&gt;File&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;New&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Project&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Web&lt;/b&gt; &amp;gt;&amp;gt; select &lt;b&gt;ASP.NET&lt;br /&gt;Empty Web Application.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-CnVgAnHc4e8/ToMlM4kqxvI/AAAAAAAADeI/a8YUMqq2RC8/s400/1.JPG" border="0" height="169" width="535" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://4.bp.blogspot.com/-4wWSkCcm4UQ/ToMlM_P3MbI/AAAAAAAADeQ/Jf3y9pCMhCU/s400/2.JPG" border="0" height="44" width="370" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step2&lt;/b&gt;: - now, just simply add a Web form page in to your application&lt;br /&gt;for that just go to &amp;gt;&amp;gt; &lt;b&gt;Solution Explorer &lt;/b&gt;&amp;gt;&amp;gt; &lt;b&gt;Right click on the&lt;br /&gt;project name&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Add&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;New Item&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Select Web Form.&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://1.bp.blogspot.com/-tfu41b6CvnI/ToMlNIbDUJI/AAAAAAAADeY/WEsPOx2K_Vc/s400/3.JPG" border="0" height="43" width="378" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step3&lt;/b&gt;: - Now Add a &lt;b&gt;FileUpload&lt;/b&gt; control and &lt;b&gt;Button&lt;/b&gt;  control from the &lt;b&gt;ToolBox&lt;/b&gt; to the &lt;b&gt;WebForm.aspx&lt;/b&gt; Page.&lt;/p&gt;&lt;img src="http://1.bp.blogspot.com/-C2eSkMlHoPg/ToMlNZ5-QMI/AAAAAAAADeg/fe-1qQCW0XA/s400/4.JPG" border="0" height="223" width="291" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;The WebForm.aspx page should appear like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-zaoeeCiqRwQ/ToMlNmvv0WI/AAAAAAAADeo/HwDaJwfLTnc/s400/5.JPG" border="0" height="153" width="392" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step4&lt;/b&gt;: - Now simply just add the below code snippet in to &lt;b&gt;WebForm1.aspx.cs&lt;/b&gt; file.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;protected void Button1_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;if ((FileUpload1.PostedFile != null) &amp;amp;&amp;amp; (FileUpload1.PostedFile.ContentLength &amp;gt; 0))&lt;br /&gt;{&lt;br /&gt;string filename = System.IO.Path.GetFileName(FileUpload1.PostedFile.FileName);&lt;br /&gt;string location = Server.MapPath("")+"\\"+filename;&lt;br /&gt;try&lt;br /&gt;{&lt;br /&gt;FileUpload1.PostedFile.SaveAs(location);&lt;br /&gt;Label2.Text="The File has been successfully uploaded";&lt;br /&gt;}&lt;br /&gt;catch (Exception ex)&lt;br /&gt;{&lt;br /&gt;Label2.Text = "Error : " + ex.Message.ToString();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;Label2.Text = "Please Enter a File";&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;The above code snippet is for the Button control for uploading the selected file to the server.&lt;br /&gt;&lt;br /&gt;Once you have completed all the above steps just run your application to get a resultant result.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-css_qbyCnCk/ToMlhTacIhI/AAAAAAAADew/y3AaX-1i68w/s400/6.JPG" border="0" height="123" width="411" /&gt;&lt;br /&gt;&lt;br /&gt;The above diagram is the running page we have created, now just click on the  browse button to select a file from desired location.&lt;/p&gt;&lt;img src="http://1.bp.blogspot.com/-DhVh7sZnjJc/ToMlhj79SAI/AAAAAAAADe4/vmm3ieVQ4GA/s400/7.JPG" border="0" height="391" width="507" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Once you have selected the file now just click on the upload button.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://2.bp.blogspot.com/-N6CzQIfJrnU/ToMlhhoWvMI/AAAAAAAADfA/Ny156JbwLnw/s400/8.JPG" border="0" height="120" width="404" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now if everything goes right you will see a result like below diagram.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://2.bp.blogspot.com/-Yk1vn1DoAOc/ToMliFkUXoI/AAAAAAAADfI/gHj6mbx_0p0/s400/9.JPG" border="0" height="127" width="412" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;View the following video on use of Static keyword: -&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/xByUSk-5sRs"&gt; &lt;img src="http://2.bp.blogspot.com/-Oe04FYQNq3Y/ToMlibWbivI/AAAAAAAADfQ/WU0U-CflMhc/s400/10.JPG" border="0" height="391" width="647" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get more learning materials for &lt;a target="_blank" href="http://www.questpond.com/"&gt;ASP.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;View author’s other article on &lt;a target="_blank" href="http://www.dotnetinterviewquestions.in/article_aspnet-interview-questions:-describe-how-can-we-browse-and-upload-a-file-in-aspnet_46.html"&gt;ASP.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-7161238089008905856?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/7161238089008905856/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=7161238089008905856' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/7161238089008905856'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/7161238089008905856'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/aspnet-interview-questions-how-to.html' title='ASP.NET interview questions: - How to Browse and Upload a file in ASP.NET?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-CnVgAnHc4e8/ToMlM4kqxvI/AAAAAAAADeI/a8YUMqq2RC8/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-8551362470228421814</id><published>2011-09-27T06:15:00.000-07:00</published><updated>2011-09-27T06:36:58.702-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Threading'/><category scheme='http://www.blogger.com/atom/ns#' term='BackGround'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><category scheme='http://www.blogger.com/atom/ns#' term='ForeGround'/><title type='text'>.NET interview questions: - What are the difference between ForeGround and  BackGround Threading?</title><content type='html'>&lt;p&gt;&lt;b&gt;Threading&lt;/b&gt;: - threading is a parallel processing unit and helps you to&lt;br /&gt;access multiple tasks at a one moment of time.&lt;br /&gt;&lt;br /&gt;A managed thread is either the Foreground thread or a Background thread.&lt;br /&gt;Background threads are identical to foreground threads with one exception: a&lt;br /&gt;background thread will not keep the managed execution environment alive. Once&lt;br /&gt;all foreground threads have been stopped in a managed process, the system stops&lt;br /&gt;all background threads and shuts down.&lt;br /&gt;&lt;br /&gt;The following points will show the difference between the Foreground and&lt;br /&gt;Background thread.&lt;br /&gt;&lt;br /&gt;1. &lt;b&gt;Foreground&lt;/b&gt; threads have the ability to prevent the current application&lt;br /&gt;from terminating. The &lt;b&gt;CLR&lt;/b&gt; will not shut down an application until all &lt;b&gt;&lt;br /&gt;Foreground&lt;/b&gt; threads have &lt;b&gt;ended&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;2. &lt;b&gt;Background&lt;/b&gt; threads are viewed by the &lt;b&gt;CLR&lt;/b&gt; as expendable paths of&lt;br /&gt;execution that can be ignored at any point in time. Thus, if all &lt;b&gt;Foreground&lt;/b&gt;&lt;br /&gt;threads have terminated then all &lt;b&gt;Background&lt;/b&gt; threads are automatically&lt;br /&gt;killed when the application domain unloads.&lt;br /&gt;&lt;br /&gt;Now, let’s create a simple demonstration to see the exact difference between the&lt;br /&gt;Foreground and Background thread.&lt;br /&gt;&lt;br /&gt;In order to see it practically just follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1&lt;/b&gt;: - Create a new project of Console Application for that just go to&lt;br /&gt;&amp;gt;&amp;gt; &lt;b&gt;File&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;New&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Project&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Windows&lt;/b&gt; &amp;gt;&amp;gt; Select &lt;b&gt;&lt;br /&gt;Console Application.&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-FocvKYDDmL8/ToHMjt8bdxI/AAAAAAAADdo/83Tu01Hp724/s400/1.JPG" border="0" height="140" width="628" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://3.bp.blogspot.com/-jdSosUolGv8/ToHMj_9ceiI/AAAAAAAADdw/Du6LJUvKuX4/s400/2.JPG" border="0" height="41" width="310" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step2&lt;/b&gt;: - Import the &lt;b&gt;namespace&lt;/b&gt; using System.Threading; in your&lt;br /&gt;program.cs file.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step3&lt;/b&gt;: - Now just add the below code snippet in your &lt;b&gt;program.cs&lt;/b&gt;  file.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;using System.Threading;&lt;br /&gt;&lt;br /&gt;namespace ConsoleApplication1&lt;br /&gt;{&lt;br /&gt;class Program&lt;br /&gt;{&lt;br /&gt;static void Main()&lt;br /&gt;{&lt;br /&gt;Test objLongTest = new Test(20);// Passing the value as 20.&lt;br /&gt;//just called the Function1 in the foreground thread.&lt;br /&gt;Thread fgThread = new Thread(new ThreadStart(objLongTest.Function1));&lt;br /&gt;fgThread.Name = "Foreground Thread";//assigned the Name to the thread.&lt;br /&gt;Test objShortTest = new Test(10);// Passing the value as 10.&lt;br /&gt;//just called the Function1 in the background thread.&lt;br /&gt;Thread bgThread = new Thread(new ThreadStart(objShortTest.Function1));&lt;br /&gt;bgThread.Name = "Background Thread";//assigned the Name to the thread.&lt;br /&gt;bgThread.IsBackground = true;//set the IsBackground property as true.&lt;br /&gt;fgThread.Start();//Started the Foreground thread.&lt;br /&gt;bgThread.Start();//Started the background thread.&lt;br /&gt;}&lt;br /&gt;class Test&lt;br /&gt;{&lt;br /&gt;int Iteration;&lt;br /&gt;public Test(int Iteration)&lt;br /&gt;{&lt;br /&gt;this.Iteration = Iteration;&lt;br /&gt;}&lt;br /&gt;public void Function1()//created a function.&lt;br /&gt;{&lt;br /&gt;String threadName = Thread.CurrentThread.Name;&lt;br /&gt;for (int i = 0; i &amp;lt; Iteration; i++)&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("{0} count: {1}",&lt;br /&gt;threadName, i.ToString());&lt;br /&gt;Thread.Sleep(350);&lt;br /&gt;}&lt;br /&gt;//the below line will print the thread name to the output screen.&lt;br /&gt;Console.WriteLine("{0} finished counting.", threadName);&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step4&lt;/b&gt;: - Now, just run your Console Application and will see result like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-Oe6VnVmZmCk/ToHMkCFCJdI/AAAAAAAADd4/x3cyxXFEnF0/s400/3.JPG" border="0" height="305" width="607" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;The above diagram proves that the &lt;b&gt;Foreground&lt;/b&gt; thread has the ability to&lt;br /&gt;prevent the current application from terminating.&lt;br /&gt;&lt;br /&gt;Watch the following video on thread, background thread and foreground thread in&lt;br /&gt;.NET: -&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/Fzckqczmgd0?hd=1"&gt;&lt;img src="http://3.bp.blogspot.com/-N0hIEyvy_3M/ToHMkddaMFI/AAAAAAAADeA/yA_ZXSogSLg/s400/4.JPG" border="0" height="391" width="645" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;See our other &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview  questions&lt;/a&gt; for preparation&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;View author’s other &lt;a target="_blank" href="http://dotnetinter.livejournal.com/44472.html"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-8551362470228421814?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/8551362470228421814/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=8551362470228421814' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8551362470228421814'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8551362470228421814'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-interview-questions-what-are_27.html' title='.NET interview questions: - What are the difference between ForeGround and  BackGround Threading?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-FocvKYDDmL8/ToHMjt8bdxI/AAAAAAAADdo/83Tu01Hp724/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-7390165450501194846</id><published>2011-09-26T06:34:00.000-07:00</published><updated>2011-09-26T07:40:27.708-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='snippet'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>.NET interview questions: - How to add a code snippet in Visual Studio 2010?</title><content type='html'>Visual Studio has two types of snippets namely &lt;b&gt;Expansion&lt;/b&gt; snippet which are inserted at the cursor and &lt;b&gt;SurroundsWith&lt;/b&gt; snippet which wraps around existing code.&lt;br /&gt;&lt;p&gt;Let’s see a small and simple example to understand it in better manner.&lt;br /&gt;&lt;br /&gt;In order to see it practically just follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1&lt;/b&gt;: - create a new project of Console Application for that just go to &amp;gt;&amp;gt; &lt;b&gt;File&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;New&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Project&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Windows&lt;/b&gt; &amp;gt;&amp;gt; Select &lt;b&gt;Console Application&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;img src="http://3.bp.blogspot.com/-_NWefYN6YLw/ToB_tAxUVyI/AAAAAAAADbY/QlVGa8eqcQY/s400/1.JPG" border="0" height="137" width="628" /&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://1.bp.blogspot.com/-1rHv8B1HqzU/ToB_tMlKEfI/AAAAAAAADbg/U-Exxj-8arA/s400/2.JPG" border="0" height="37" width="306" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step2&lt;/b&gt;: - Add XML file in your project for that just go to &amp;gt;&amp;gt; &lt;b&gt;Solution&lt;br /&gt;Explorer&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Right Click on the project name&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Add&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Add&lt;br /&gt;New Item&lt;/b&gt; &amp;gt;&amp;gt; Select&lt;b&gt; XML File&lt;/b&gt;.&lt;/p&gt;&lt;img src="http://2.bp.blogspot.com/-Amyt76_1xUk/ToB_taEKsbI/AAAAAAAADbo/K079BRXDHE8/s400/3.JPG" border="0" height="42" width="313" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;Note: - Please save the XML File with .snippet extension like below diagram.&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://3.bp.blogspot.com/-2JeLhYR42Jo/ToB_tVUng4I/AAAAAAAADbw/g0cZhrhzSp4/s400/4.JPG" border="0" height="118" width="403" /&gt;&lt;b&gt;&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step3&lt;/b&gt;: - Now just right click on &lt;b&gt;code editor window &lt;/b&gt;and select the  menu item &lt;b&gt;Insert snippet&lt;/b&gt; or &lt;b&gt;Press Ctrl + K + X &lt;/b&gt;and click the item &lt;b&gt;Snippet&lt;/b&gt; like below diagrams.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;img src="http://2.bp.blogspot.com/--ZK1QwXxB00/ToB_tRI2EzI/AAAAAAAADb4/OQ5T5ADo-6w/s400/5.JPG" border="0" height="121" width="315" /&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://2.bp.blogspot.com/-NF_FY6pe0Hs/ToCAQCFD4XI/AAAAAAAADcA/K0wTeAr6xKI/s400/6.JPG" border="0" height="162" width="324" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;As soon as you select Snippet the following &lt;b&gt;tags&lt;/b&gt; will be automatically to  the code editor window like below diagram.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://3.bp.blogspot.com/-OrvpeQAvvFs/ToCAQYzLmhI/AAAAAAAADcI/A5-rmeb8A6Y/s400/7.JPG" border="0" height="445" width="368" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step4&lt;/b&gt;: - Just remove the tag below as we are creating an Expansion snippet.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;SnippetType&amp;gt;SurroundsWith&amp;lt;/SnippetType&amp;gt;&lt;br /&gt;Now simply just make the necessary changes to the tags as I have done in below code snippet.&lt;br /&gt;&amp;lt;?xml version="1.0" encoding="utf-8" ?&amp;gt;&lt;br /&gt;&amp;lt;CodeSnippet Format="1.0.0" xmlns="http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet"&amp;gt;&lt;br /&gt;&amp;lt;Header&amp;gt;&lt;br /&gt;&amp;lt;Title&amp;gt;CodeSnippetExample&amp;lt;/Title&amp;gt;&lt;br /&gt;&amp;lt;Author&amp;gt;Feroz Shaikh&amp;lt;/Author&amp;gt;&lt;br /&gt;&amp;lt;Shortcut&amp;gt;CodeSnippet&amp;lt;/Shortcut&amp;gt;&lt;br /&gt;&amp;lt;Description&amp;gt;Add a Header to Code File&amp;lt;/Description&amp;gt;&lt;br /&gt;&amp;lt;SnippetTypes&amp;gt;&lt;br /&gt;&amp;lt;!--&amp;lt;SnippetType&amp;gt;SurroundsWith&amp;lt;/SnippetType&amp;gt;--&amp;gt;&lt;br /&gt;&amp;lt;SnippetType&amp;gt;Expansion&amp;lt;/SnippetType&amp;gt;&lt;br /&gt;&amp;lt;/SnippetTypes&amp;gt;&lt;br /&gt;&amp;lt;/Header&amp;gt;&lt;br /&gt;&amp;lt;Snippet&amp;gt;&lt;br /&gt;&amp;lt;Declarations&amp;gt;&lt;br /&gt;&amp;lt;Literal&amp;gt;&lt;br /&gt;&amp;lt;ID&amp;gt;Author&amp;lt;/ID&amp;gt;&lt;br /&gt;&amp;lt;Default&amp;gt;Feroz Shaikh&amp;lt;/Default&amp;gt;&lt;br /&gt;&amp;lt;/Literal&amp;gt;&lt;br /&gt;&amp;lt;/Declarations&amp;gt;&lt;br /&gt;&amp;lt;Code Language="CSharp"&amp;gt;&lt;br /&gt;&amp;lt;![CDATA[&lt;br /&gt;/**************** Code File Header ******************&lt;br /&gt;Author: $Author$&lt;br /&gt;Date: 26/09/2011&lt;br /&gt;Version: 1.0.0.1&lt;br /&gt;Description: Adding a header to the Code File&lt;br /&gt;****************************************************/&lt;br /&gt;]]&amp;gt;&lt;br /&gt;&amp;lt;/Code&amp;gt;&lt;br /&gt;&amp;lt;/Snippet&amp;gt;&lt;br /&gt;&amp;lt;/CodeSnippet&amp;gt;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step5&lt;/b&gt;: - Now we have to load the &lt;b&gt;snippet&lt;/b&gt; in the &lt;b&gt;Visual  Studio&lt;/b&gt; for that we have to use &lt;b&gt;Code Snippet Manager&lt;/b&gt; which comes under &lt;b&gt;Tools&lt;/b&gt; menu like below diagrams.&lt;br /&gt;&lt;br /&gt;Go to &amp;gt;&amp;gt; &lt;b&gt;Tools&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Customize&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Commands&lt;/b&gt; &amp;gt;&amp;gt; &lt;b&gt;Tools&lt;/b&gt; &amp;gt;&amp;gt;&lt;br /&gt;&lt;b&gt;Add Command&lt;/b&gt; &amp;gt;&amp;gt;Select &lt;b&gt;Code Snippet Manager.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-kMBINOwgfOk/ToCAQadSxmI/AAAAAAAADcQ/H0cxHZi7pGk/s400/8.JPG" border="0" height="116" width="346" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://4.bp.blogspot.com/-W6UepH590UA/ToCAQfuA-PI/AAAAAAAADcY/FsDGBEsvcp0/s400/9.JPG" border="0" height="285" width="529" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step6&lt;/b&gt;: - Now simply just save the file (&lt;b&gt;MyCodeSnippet.snippet&lt;/b&gt;) to your desired location like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-giSiZV0HbJs/ToCAQsUYCRI/AAAAAAAADcg/N0IGfMDe-cI/s400/10.JPG" border="0" height="252" width="334" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;img src="http://2.bp.blogspot.com/-Cl1aB72L5dk/ToCArD1vK4I/AAAAAAAADco/NkVOOSS7OqU/s400/11.JPG" border="0" height="367" width="619" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;Step7&lt;/b&gt;: - Now just simply open the &lt;b&gt;code snippet manager and&lt;/b&gt; click on &lt;b&gt;Import&lt;/b&gt; like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-hJhLeBcHdJ0/ToCAraTyl-I/AAAAAAAADcw/xkZi6IgGqD4/s400/12.JPG" border="0" height="321" width="322" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://3.bp.blogspot.com/-gxWRlMHvz-M/ToCArZKjJ-I/AAAAAAAADc4/YwHTsyrv-7E/s400/13.JPG" border="0" height="474" width="617" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-j67aFibn1Zs/ToCArYwM03I/AAAAAAAADdA/KQWteoXLjms/s400/14.JPG" border="0" height="257" width="558" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step8&lt;/b&gt;: - Now just simply open the &lt;b&gt;program&lt;/b&gt;.&lt;b&gt;cs&lt;/b&gt; file of console application and just add the created snippet in the code like below diagram.&lt;br /&gt;&lt;br /&gt;Just right click on the code to add the snippet.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-B6rECpj1ppY/ToCArk2MyCI/AAAAAAAADdI/dqs_py2CQpE/s400/15.JPG" border="0" height="146" width="289" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://2.bp.blogspot.com/-McETV3r1wSo/ToCBOiYp_NI/AAAAAAAADdQ/mwwsBJRUOvA/s400/16.JPG" border="0" height="106" width="414" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Now you will see that snippet is now being added to the code like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;img src="http://3.bp.blogspot.com/-058dA3hTOYw/ToCBO9EJ9_I/AAAAAAAADdY/vrNpApOhn2I/s400/17.JPG" border="0" height="237" width="422" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Similarly, you can test for the second method &lt;b&gt;SurroundsWith.&lt;/b&gt;&lt;/p&gt;Also view our video on CAS, evidence, permission set &amp;amp; code groups as follows: -&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/qNnOi5xi9KM?hd=1"&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/--fDzZ7zWOPc/ToCBO0JlVXI/AAAAAAAADdg/PTWXHZNmddg/s400/18.JPG" border="0" height="393" width="642" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Avail from the link more .&lt;a target="_blank" href="http://www.questpond.com/"&gt;NET interview questions&lt;/a&gt; for preparation.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Refer author’s other blog for complete &lt;a target="_blank" href="http://questpond.over-blog.com/article-net-interview-questions---different-was-to-add-a-code-snippet-in-visual-studio-2010-85223757.html"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-7390165450501194846?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/7390165450501194846/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=7390165450501194846' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/7390165450501194846'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/7390165450501194846'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-interview-questions-how-to-add-code.html' title='.NET interview questions: - How to add a code snippet in Visual Studio 2010?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-_NWefYN6YLw/ToB_tAxUVyI/AAAAAAAADbY/QlVGa8eqcQY/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5989238485941918009</id><published>2011-09-24T23:12:00.000-07:00</published><updated>2011-09-24T23:15:41.219-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.net interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>12 Videos on important .NET interview Questions &amp; Answers</title><content type='html'>In this video series we will see videos on some 12 important .NET and c# interview questions like Generics,garbage collector,CAS,Private constructors,Anonymous methods, Diff betwn Unique and primary key/convert and tostring,checked and unchecked ..Lot more&lt;br /&gt;&lt;br /&gt;&lt;p&gt;for more .net and c# interview questions videos click on &lt;a href="http://www.questpond.com/"&gt;.NET and c# interview questions &lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5989238485941918009?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5989238485941918009/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5989238485941918009' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5989238485941918009'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5989238485941918009'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/12-videos-on-important-net-interview.html' title='12 Videos on important .NET interview Questions &amp; Answers'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-628600087665516937</id><published>2011-09-24T05:50:00.000-07:00</published><updated>2011-09-24T06:05:40.952-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='visual studio'/><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><title type='text'>C# interview questions :- How do you debug C# applications using Visual studio ?.</title><content type='html'>&lt;p&gt;I use the following things for debugging c# applications using visual studio :-&lt;br /&gt;&lt;br /&gt;1. Step over if we want to move one step after other.&lt;br /&gt;&lt;br /&gt;2. Step in , if we want to move in to a function.&lt;br /&gt;&lt;br /&gt;3. Step out , if we want to move out of the function.&lt;br /&gt;&lt;br /&gt;4. Add watch and Quick watch to see the variable data.&lt;br /&gt;&lt;br /&gt;5. Intellitrace to back trace debugging history.&lt;br /&gt;&lt;br /&gt;Put the below link of the video&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/watch?v=QCPt9aOcd98"&gt;&lt;img src="http://3.bp.blogspot.com/-HwV4gmJzn8o/Tn3SQOxXYxI/AAAAAAAADbQ/K2e0DHno0n0/s400/1.JPG" border="0" height="389" width="641" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get more materials on  &lt;a target="_blank" href="http://www.questpond.com/"&gt;C# interview questions&lt;/a&gt;&lt;/p&gt;Regards,&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Also see author’s other blog on &lt;a href="http://www.dotnetinterviewquestions.in/article_sql-server-interview-questions:-show-us-sql-injection-in-sql-server_42.html"&gt;C# &lt;/a&gt;&lt;a target="_blank" href="http://questpond.blog.com/2011/09/24/c-interview-questions-debug-c-applications-using-visual-studio/"&gt;interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-628600087665516937?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/628600087665516937/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=628600087665516937' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/628600087665516937'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/628600087665516937'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/c-interview-questions-how-do-you-debug.html' title='C# interview questions :- How do you debug C# applications using Visual studio ?.'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-HwV4gmJzn8o/Tn3SQOxXYxI/AAAAAAAADbQ/K2e0DHno0n0/s72-c/1.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-7801956044197273607</id><published>2011-09-24T03:47:00.000-07:00</published><updated>2011-09-24T03:47:16.431-07:00</updated><title type='text'>5 tips to debug c# program using visual studio 2010 ( f10,11 watch windo...</title><content type='html'>&lt;iframe width="480" height="270" src="http://www.youtube.com/embed/QCPt9aOcd98?fs=1" frameborder="0" allowFullScreen=""&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;p&gt;for more .net and c# interview questions videos click on &lt;a href="http://www.questpond.com"&gt;.NET and c# interview questions &lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-7801956044197273607?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/7801956044197273607/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=7801956044197273607' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/7801956044197273607'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/7801956044197273607'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/5-tips-to-debug-c-program-using-visual.html' title='5 tips to debug c# program using visual studio 2010 ( f10,11 watch windo...'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/QCPt9aOcd98/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-2585293134826281188</id><published>2011-09-23T06:00:00.000-07:00</published><updated>2011-09-23T06:20:01.846-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Server interview questions: - State the term SQL injection in SQL Server?</title><content type='html'>&lt;p&gt;This is one of the most favorite SQL Server interview questions asked by the&lt;br /&gt;interviewer.&lt;br /&gt;&lt;br /&gt;It is basically a Form of attack on a database-driven Web site in which the&lt;br /&gt;attacker executes unauthorized SQL commands by taking advantage of insecure code&lt;br /&gt;on a system connected to the Internet, bypassing the firewall. SQL injection&lt;br /&gt;attacks are used to steal information from a database from which the data would&lt;br /&gt;normally not be available and/or to gain access to an organization’s host&lt;br /&gt;computers through the computer that is hosting the database.&lt;br /&gt;&lt;br /&gt;SQL injection attacks typically are easy to avoid by ensuring that a system has&lt;br /&gt;strong input validation.&lt;br /&gt;&lt;br /&gt;As name suggest we inject SQL which can be relatively dangerous for the&lt;br /&gt;database. Example this is a simple SQL&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;SELECT email, passwd, login_id, full_name&lt;br /&gt;FROM members&lt;br /&gt;WHERE email = 'x'&lt;/pre&gt;&lt;br /&gt;Now somebody does not put “x” as the input but puts “x ; DROP TABLE members;”. So the actual SQL which will execute is:-&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;SELECT email, passwd, login_id, full_name&lt;br /&gt;FROM members&lt;br /&gt;WHERE email = ‘x’; DROP TABLE members;&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;Think what will happen to your database.&lt;br /&gt;&lt;br /&gt;Also see another  &lt;a target="_blank" href="http://www.questpond.com/demo.html"&gt;SQL server interview questions &lt;/a&gt;video on difference between unique key and&lt;br /&gt;primary key as follows: -&lt;br /&gt;&lt;/p&gt;&lt;a target="_blank" href="http://youtu.be/8iIvyNPwruU?hd=1"&gt;&lt;img src="http://3.bp.blogspot.com/-1CD9lqeG_dA/TnyDKLcQfHI/AAAAAAAADbI/iLrHR0jtY40/s400/1.JPG" border="0" height="393" width="646" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Get more materials on &lt;a href="http://www.questpond.com/"&gt;Sql Server&lt;/a&gt;&lt;a target="_blank" href="http://www.questpond.com/"&gt; interview questions&lt;/a&gt;&lt;/p&gt;Regards,&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Also see author’s other blog on &lt;a target="_blank" href="http://dotnetinterviewquestion.wordpress.com/2011/09/23/sql-server-interview-questions-how-can-you-define-the-term-sql-injection-in-sql-server/"&gt;SQL server interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-2585293134826281188?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/2585293134826281188/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=2585293134826281188' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2585293134826281188'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/2585293134826281188'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/sql-server-interview-questions-state.html' title='SQL Server interview questions: - State the term SQL injection in SQL Server?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-1CD9lqeG_dA/TnyDKLcQfHI/AAAAAAAADbI/iLrHR0jtY40/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-7997353706152241091</id><published>2011-09-22T06:39:00.000-07:00</published><updated>2011-09-22T07:04:50.740-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net framework'/><title type='text'>.NET interview questions: - What are the difference between .NET Framework 4  and .NET Framework 4 Client Profile?</title><content type='html'>&lt;b&gt;.NET Framework 4 Client Profile&lt;/b&gt;: - The .NET Framework 4 Client Profile is a downsized version of .NET Framework 4 and is basically used when you want to create windows based applications and you do not want the complete framework to be installed.&lt;br /&gt;&lt;p&gt;Now, let’s see the features that are not included in the .NET Framework 4  Client Profile.&lt;br /&gt;&lt;br /&gt;As it’s a downsized version following are not included in the .NET Framework 4&lt;br /&gt;Client Profile as compared to the .NET Framework 4.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;1. ASP.NET.&lt;br /&gt;&lt;br /&gt;2. Advanced Windows Communication Foundation (WCF) Functionality.&lt;br /&gt;&lt;br /&gt;3. .NET Framework Data Provider for Oracle.&lt;br /&gt;&lt;br /&gt;4. MSBuild for Compiling.&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;Now, let’s see a small demonstration to understand it better manner and also&lt;br /&gt;prove the above points.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1&lt;/b&gt;: - create a new windows application for that just &lt;b&gt;GoTo &amp;gt; File &amp;gt;&lt;br /&gt;New &amp;gt; Project &amp;gt; Windows &amp;gt; Select Windows Form Application&lt;/b&gt; like below&lt;br /&gt;diagrams.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-0Gj7etv9XOQ/Tns6psH3c4I/AAAAAAAADaQ/qxiv5Or-Mpo/s400/1.JPG" border="0" height="140" width="590" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://2.bp.blogspot.com/-mmOilyANtAs/Tns6pr-yL3I/AAAAAAAADaY/Bi8D6b2SjIg/s400/2.JPG" border="0" height="150" width="545" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note&lt;/b&gt;: - In the above diagram you can see that I have target the framework&lt;br /&gt;as .NET Framework 4.&lt;br /&gt;&lt;br /&gt;Now, let’s see that which framework is been assigned to your Windows Application&lt;br /&gt;by the visual studio for that just Right click on the &lt;b&gt;Project Name &amp;gt; Go To &amp;gt;&lt;br /&gt;Properties&lt;/b&gt;. As soon as you click on properties a new window will open like&lt;br /&gt;below diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-0ZNqrokNf9A/Tns6p2SF13I/AAAAAAAADag/lo9hDzwKr2M/s400/3.JPG" border="0" height="208" width="446" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the above diagram you can clearly see that the Visual Studio selected the Framework as .&lt;b&gt;NET Framework 4 Client Profile &lt;/b&gt;by default.&lt;br /&gt;&lt;br /&gt;Now, let’s see what happens when we create a project on ASP.NET.&lt;br /&gt;&lt;br /&gt;Create a new project of ASP.NET application for that just &lt;b&gt;go to &amp;gt; File &amp;gt; New&lt;br /&gt;&amp;gt; Project &amp;gt; Web &amp;gt; Select ASP.NET Web Application&lt;/b&gt; like below diagrams.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-rhd4_olxnt0/Tns6p6_pvSI/AAAAAAAADao/S8Zr8aWxymg/s400/4.JPG" border="0" height="140" width="538" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://1.bp.blogspot.com/-6e9-PkGpJc8/Tns6qI5jDuI/AAAAAAAADaw/oEg49Y8pVkw/s400/5.JPG" border="0" height="146" width="544" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Note&lt;/b&gt;: - In the above diagram you can see that I have target the framework as .NET Framework 4.&lt;br /&gt;&lt;br /&gt;Similarly, let’s see that which framework is been assigned to your Windows&lt;br /&gt;Application by the visual studio for that just Right click on the P&lt;b&gt;roject&lt;br /&gt;Name &amp;gt; Go To &amp;gt; Properties&lt;/b&gt;. As soon as you click on properties a new window&lt;br /&gt;will open like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;img src="http://2.bp.blogspot.com/-tBa5iYKdw4w/Tns67DFQ5gI/AAAAAAAADa4/iBSC9wYa1D0/s400/6.JPG" border="0" height="204" width="481" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Now, in the above diagram you can clearly see that the Visual Studio has selected the framework as .NET Framework 4.&lt;br /&gt;&lt;br /&gt;The above difference proves that the .NET Framework 4 Client Profile does not&lt;br /&gt;include feature of ASP.NET.&lt;br /&gt;&lt;br /&gt;Similarly, you can demonstrate simple to see the further differences between the&lt;br /&gt;.NET Framework 4 and .NET Framework 4 Client Profile.&lt;br /&gt;&lt;br /&gt;Watch video on regular expression with practical demonstration as follows: - &lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/C2zm0roE-Uc?hd=1"&gt;&lt;img src="http://4.bp.blogspot.com/-4F5GLd6zZ00/Tns67TtBAOI/AAAAAAAADbA/rHLA_fezJdM/s400/7.JPG" border="0" height="393" width="641" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get more materials on &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;See more stuffs on author’s blog for&lt;a target="_blank" href="http://www.dotnetinterviewquestions.in/article_net-interview-questions:-how-does-net-framework-4-differ-from-net-framework-4-client-profile_41.html"&gt; .NET interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-7997353706152241091?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/7997353706152241091/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=7997353706152241091' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/7997353706152241091'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/7997353706152241091'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-interview-questions-what-are_22.html' title='.NET interview questions: - What are the difference between .NET Framework 4  and .NET Framework 4 Client Profile?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-0Gj7etv9XOQ/Tns6psH3c4I/AAAAAAAADaQ/qxiv5Or-Mpo/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-6484275916916010946</id><published>2011-09-21T05:53:00.000-07:00</published><updated>2011-09-21T06:35:17.683-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='WWF'/><category scheme='http://www.blogger.com/atom/ns#' term='Workflow . WWF Interview Question'/><title type='text'>WWF interview questions: - What are different types of Workflow in Windows  Workflow foundation?</title><content type='html'>&lt;p&gt;There are two basics type of workflow Sequential Workflow and State machines&lt;br /&gt;workflow.&lt;br /&gt;&lt;br /&gt;A sequential workflow has clear start and finish boundaries. Workflow controls&lt;br /&gt;execution in Sequential workflow. In sequential execution, one task is executed&lt;br /&gt;after other. Sequential workflow is more rigid in format and execution path has&lt;br /&gt;a determistic nature.&lt;br /&gt;&lt;br /&gt;A State machine workflow is more dynamic in nature. Workflow has states and the&lt;br /&gt;state waits for events to help it move to next state. In State machine execution&lt;br /&gt;path is undetermestic nature.&lt;br /&gt;&lt;br /&gt;Below figure shows visual conceptualization of fundamentals. You can see in&lt;br /&gt;Sequential workflow the execution path is very determent. Shiv performs the&lt;br /&gt;entire task sequentially and these tasks are very determent. Now have a look at&lt;br /&gt;the second workflow. Every state goes to other state when it receives some&lt;br /&gt;external events. For instance when Shiv is seeing star trek there is an event of&lt;br /&gt;flashing news which triggers him to see the flashing new.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://1.bp.blogspot.com/-CJ8doHMA3eg/TnnfLC6ZC-I/AAAAAAAADaA/Iep6N7-lMrY/s400/1.JPG" border="0" height="483" width="599" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;View the following video on need of WPF: -&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/hKtx_Y6LA_g"&gt;&lt;img src="http://3.bp.blogspot.com/-1QZetA7BTOo/TnnfLViWU-I/AAAAAAAADaI/398o_hz4U1M/s400/2.JPG" border="0" height="392" width="646" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get more learning materials for &lt;a target="_blank" href="http://www.questpond.com/"&gt;WWF interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;View author’s other article on &lt;a target="_blank" href="http://dotnetinterviewquestions.blog.co.in/2011/09/21/wwf-interview-questions-different-types-of-workflow-in-windows-workflow-foundation/"&gt;WWF interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-6484275916916010946?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/6484275916916010946/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=6484275916916010946' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/6484275916916010946'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/6484275916916010946'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/wwf-interview-questions-what-are.html' title='WWF interview questions: - What are different types of Workflow in Windows  Workflow foundation?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-CJ8doHMA3eg/TnnfLC6ZC-I/AAAAAAAADaA/Iep6N7-lMrY/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-4224041362073225659</id><published>2011-09-20T05:50:00.000-07:00</published><updated>2011-09-20T06:05:28.520-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Delegates'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>.NET interview questions: - How can we create a delegate?</title><content type='html'>&lt;p&gt;This is the .NET interview questions which you come across many a times. So&lt;br /&gt;following is the answer to it with explanation.&lt;br /&gt;&lt;br /&gt;Creating a delegate is four step process:-&lt;br /&gt;&lt;br /&gt;• Declare a delegate.&lt;br /&gt;&lt;br /&gt;• Create an object reference.&lt;br /&gt;&lt;br /&gt;• Point the reference to the method.&lt;br /&gt;&lt;br /&gt;• Invoke the method via the delegate.&lt;br /&gt;&lt;br /&gt;Below is the code snippet for the same.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;// Declare a delegate&lt;br /&gt;public delegate int PointToAdd(int i, int y);&lt;br /&gt;&lt;br /&gt;// Create a reference pointer&lt;br /&gt;PointToAdd objpointer = null;&lt;br /&gt;&lt;br /&gt;// Point to the method&lt;br /&gt;objpointer = Add;&lt;br /&gt;&lt;br /&gt;// Invoke the function/method&lt;br /&gt;objpointer.Invoke(10,20);&lt;/pre&gt;&lt;br /&gt;See the following video on different types of collection in .NET and C#: -&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;a target="_blank" href="http://youtu.be/hDykzD-3z8k?hd=1"&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-a-WH9upMWSc/TniMIIOfTzI/AAAAAAAADZ4/97n9_8V0fNk/s400/1.JPG" border="0" height="391" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;  for preparation of real time interviews.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Get more from author’s blogs for &lt;a target="_blank" href="http://dotnetinter.livejournal.com/43403.html"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-4224041362073225659?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/4224041362073225659/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=4224041362073225659' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4224041362073225659'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4224041362073225659'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-interview-questions-how-can-we.html' title='.NET interview questions: - How can we create a delegate?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-a-WH9upMWSc/TniMIIOfTzI/AAAAAAAADZ4/97n9_8V0fNk/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5851184124513079816</id><published>2011-09-19T07:04:00.000-07:00</published><updated>2011-09-19T07:26:27.052-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='CAS'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>.NET interview questions: - So how does CAS actually work?</title><content type='html'>&lt;p&gt;Working of CAS includes four necessary steps as process and they listed as&lt;br /&gt;follows:-&lt;br /&gt;&lt;br /&gt;• First Evidence is gathered about the assembly. In other words from where did&lt;br /&gt;this assembly come? , who is the publisher etc.&lt;br /&gt;&lt;br /&gt;• Depending on evidences the assembly is assigned to a code group. In other&lt;br /&gt;words what rights does the assembly depending on the evidence gathered.&lt;br /&gt;&lt;br /&gt;• Depending on code group security rights are allocated.&lt;br /&gt;&lt;br /&gt;• Using the security rights the assembly is run with in those rights&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://4.bp.blogspot.com/-BsZyIAOoH_s/TndMGR01TcI/AAAAAAAADZo/mUE2gnoQ0b8/s400/1.JPG" border="0" height="395" width="546" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Also view our video on CAS, evidence, permission set &amp;amp; code groups as follows: -&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/qNnOi5xi9KM?hd=1"&gt;&lt;img src="http://1.bp.blogspot.com/-XchLSUzjjyI/TndMSD07xMI/AAAAAAAADZw/py1uDQmZp58/s400/2.JPG" border="0" height="391" width="645" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Avail from the link more &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt; for preparation.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Refer author’s other blog for complete &lt;a target="_blank" href="http://dotnetinterviewquestion.wordpress.com/2011/09/19/net-interview-questions-different-ways-of-working-of-cas/"&gt;.NET interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5851184124513079816?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5851184124513079816/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5851184124513079816' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5851184124513079816'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5851184124513079816'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-interview-questions-so-how-does-cas.html' title='.NET interview questions: - So how does CAS actually work?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-BsZyIAOoH_s/TndMGR01TcI/AAAAAAAADZo/mUE2gnoQ0b8/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-4147931147142024209</id><published>2011-09-17T11:46:00.000-07:00</published><updated>2011-09-17T12:01:23.013-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='overloading'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>.NET interview questions: - What is operator overloading?</title><content type='html'>&lt;p&gt;Operator overloading is a concept of polymorphism where you can redefine&lt;br /&gt;operators like +, - , * etc with additional functionalities.&lt;br /&gt;&lt;br /&gt;For instance we can redefine the + functionalities to add objects like obj1 +&lt;br /&gt;obj2. Below is simple code snippet which redefines + operator.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class SomeClass&lt;br /&gt;{&lt;br /&gt;private int someValue;&lt;br /&gt;public SomeClass(int val)&lt;br /&gt;{&lt;br /&gt;someValue = val;&lt;br /&gt;}&lt;br /&gt;public static SomeClass operator +(SomeClass arg1, SomeClass arg2)&lt;br /&gt;{&lt;br /&gt;return new SomeClass(arg1.someValue + arg2.someValue);&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;You can now use the + operator to add objects of type someclass as shown in the below code snippet.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;Obj = obj1 = obj2;&lt;/pre&gt;Also see the following private constructor video: -&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/8xyXjdUtmfQ?hd=1"&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-gp8K9cenw_I/TnTsFNZ4EkI/AAAAAAAADZg/uTgBE80viLA/s400/1.JPG" border="0" height="392" width="642" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions &lt;/a&gt;for preparation of real time interviews.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Get more from author’s blogs for &lt;a target="_blank" href="http://questpond.over-blog.com/article-net-interview-questions-define-operator-overloading-84549797.html"&gt;.NET interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-4147931147142024209?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/4147931147142024209/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=4147931147142024209' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4147931147142024209'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4147931147142024209'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-interview-questions-what-is.html' title='.NET interview questions: - What is operator overloading?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-gp8K9cenw_I/TnTsFNZ4EkI/AAAAAAAADZg/uTgBE80viLA/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-8269371642750003373</id><published>2011-09-16T06:03:00.000-07:00</published><updated>2011-09-16T06:23:32.395-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dynamic'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><category scheme='http://www.blogger.com/atom/ns#' term='Polymorphism'/><title type='text'>.NET interview questions: - How to implement dynamic polymorphism?</title><content type='html'>&lt;p&gt;This is the .NET interview questions which you come across many a times. So&lt;br /&gt;following is the answer to it with explanation.&lt;br /&gt;&lt;br /&gt;Dynamic polymorphism is implemented by using overriding and virtual keyword.&lt;br /&gt;&lt;br /&gt;Below is a simple code snippet which has three classes, Customer class is the&lt;br /&gt;parent class.CustomerDiscount10Percent and CustomerDiscount20Percent are child&lt;br /&gt;classes.&lt;br /&gt;&lt;br /&gt;Customer parent class has a discount function which returns zero discounts. This&lt;br /&gt;function is defined as virtual and then overridden by both the child classes&lt;br /&gt;with 10 and 20% discount.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class Customer&lt;br /&gt;{&lt;br /&gt;public string customerName;&lt;br /&gt;public string customerCode;&lt;br /&gt;public virtual int Discount()&lt;br /&gt;{&lt;br /&gt;return 0;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class CustomerDiscount10Percent : Customer&lt;br /&gt;{&lt;br /&gt;public override int Discount()&lt;br /&gt;{&lt;br /&gt;return 10;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;class CustomerDiscount20Percent : Customer&lt;br /&gt;{&lt;br /&gt;public override int Discount()&lt;br /&gt;{&lt;br /&gt;return 20;&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;At the client side on the fly your parent object can point to any child classes and invoke the child implementation accordingly. This is called as dynamic polymorphism; the parent object can point to any of the child objects and invoke the child function dynamically.&lt;br /&gt;&lt;pre&gt;Customer obj;&lt;br /&gt;obj = new CustomerDiscount10Percent();&lt;br /&gt;obj = new CustomerDiscount20Percent();&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;See the following UML video on Use Case Diagram: -&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://youtu.be/Zk-580BqSNY"&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-eTHKJcnp0MM/TnNJVGqRNFI/AAAAAAAADZY/6z6FJ2-yyv8/s400/1.JPG" border="0" height="390" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;  for preparation of real time interviews.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Get more from author’s blogs for &lt;a target="_blank" href="http://questpond.blog.com/2011/09/16/net-interview-questions-elaborate-steps-to-implement-dynamic-polymorphism/"&gt;.NET interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-8269371642750003373?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/8269371642750003373/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=8269371642750003373' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8269371642750003373'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8269371642750003373'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-interview-questions-how-to.html' title='.NET interview questions: - How to implement dynamic polymorphism?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-eTHKJcnp0MM/TnNJVGqRNFI/AAAAAAAADZY/6z6FJ2-yyv8/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-6033084673263861586</id><published>2011-09-15T06:17:00.000-07:00</published><updated>2011-09-15T06:37:07.154-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>.NET interview questions: - How to clean unmanaged objects and also maintain its performance?</title><content type='html'>&lt;p&gt;In order to clean unmanaged objects we need to follow the below steps:-&lt;br /&gt;&lt;br /&gt;• Implement IDisposable interface and implement the dispose function.&lt;br /&gt;&lt;br /&gt;• In Dispose function call the “GC.SuppressFinalize” method.&lt;br /&gt;&lt;br /&gt;• At the client side ensure that the “Dispose” function is called when the&lt;br /&gt;object is no more required.&lt;br /&gt;&lt;br /&gt;Below goes the code, this is also called as “Finalize and Dispose pattern”. This&lt;br /&gt;ensures that your objects are created in Generation 0 rather than Generation 1.&lt;br /&gt;“GC.SuppressFinalize” tells the garbage collector to not worry about destructor&lt;br /&gt;and destroy the objects in the first call itself. &lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class clsMyClass : IDisposable&lt;br /&gt;{&lt;br /&gt;~clsMyClass()&lt;br /&gt;{&lt;br /&gt;// In case the client forgets to call&lt;br /&gt;// Dispose , destructor will be invoked for&lt;br /&gt;Dispose(false);&lt;br /&gt;}&lt;br /&gt;protected virtual void Dispose(bool disposing)&lt;br /&gt;{&lt;br /&gt;if (disposing)&lt;br /&gt;{&lt;br /&gt;// Free managed objects.&lt;br /&gt;}&lt;br /&gt;// Free unmanaged objects&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;public void Dispose()&lt;br /&gt;{&lt;br /&gt;Dispose(true);&lt;br /&gt;// Ensure that the destructor is not called&lt;br /&gt;GC.SuppressFinalize(this);&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Also view following video on estimations of software projects using Function Point Analysis: -&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/GBjk6azJZm8"&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-L18uPgojSjQ/TnH7En9adgI/AAAAAAAADZQ/F7bURltsi2Y/s400/1.JPG" border="0" height="391" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get more&lt;a target="_blank" href="http://www.questpond.com/"&gt; .NET interview questions&lt;/a&gt; for preparation.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;View author’s blog for more &lt;a target="_blank" href="http://www.dotnetinterviewquestions.in/article_net-interview-questions:-explain-the-steps-to-clean-unmanaged-objects-and-also-maintain-its-performance_35.html"&gt;.NET interview questions&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-6033084673263861586?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/6033084673263861586/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=6033084673263861586' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/6033084673263861586'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/6033084673263861586'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-interview-questions-how-to-clean.html' title='.NET interview questions: - How to clean unmanaged objects and also maintain its performance?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-L18uPgojSjQ/TnH7En9adgI/AAAAAAAADZQ/F7bURltsi2Y/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-1254407338652820869</id><published>2011-09-14T06:32:00.000-07:00</published><updated>2011-09-14T07:20:32.612-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Grid view'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>.NET and ASP.NET interview questions: - How to change cells color of GridView according to some condition?</title><content type='html'>&lt;p&gt;This is not one of the typical .NET interview questions but on knowledge aspect&lt;br /&gt;it might be very helpful and also helpful while you dealing with GridView.&lt;br /&gt;&lt;br /&gt;Let’s do simple demonstration to see how exactly we can achieve this&lt;br /&gt;practically.&lt;br /&gt;&lt;br /&gt;In order to achieve this practically just follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1&lt;/b&gt;: - create a simple ASP.NET Empty Web Application for that just &lt;b&gt;&lt;br /&gt;Go To &amp;gt; File &amp;gt; New &amp;gt; Project &amp;gt; Select ASP.NET Empty Web Application.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-HWbsUIlGAOo/TnCs_V98pwI/AAAAAAAADYg/c_9ooDQ8OEY/s400/1.JPG" border="0" height="152" width="628" /&gt;&lt;/p&gt;&lt;img src="http://2.bp.blogspot.com/-FGdOuGme18Y/TnCtFTF2glI/AAAAAAAADYo/iz13yoN9H0U/s400/2.JPG" border="0" height="78" width="628" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;Step2&lt;/b&gt;: - Now add a Web Form in your project for that just &lt;b&gt;Go To &amp;gt; Solution Explorer &amp;gt; Right Click on the Project Name &amp;gt; Add &amp;gt; Add New Item &amp;gt; Select Web Form.&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;img src="http://2.bp.blogspot.com/-wE42TS8-vOg/TnCty1wgECI/AAAAAAAADYw/S_BuvFqbqz4/s400/3.JPG" border="0" height="57" width="628" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;Step3&lt;/b&gt;: - Now just drag and drop GridView control to your Web Form.&lt;/p&gt;&lt;img src="http://1.bp.blogspot.com/-BRkb_2eFU5c/TnCt4WyZdBI/AAAAAAAADY4/r_oxK_Xrygc/s400/4.JPG" border="0" height="238" width="301" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;b&gt;Step4&lt;/b&gt;: - Now just create a method to bind the data to the GridView control as I have done in below code snippet and later just call that method on the &lt;b&gt;form_load event.&lt;/b&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;LoadGridView();&lt;br /&gt;}&lt;br /&gt;public void LoadGridView()&lt;br /&gt;{&lt;br /&gt;SqlConnection Con = new SqlConnection(ConnectionString);&lt;br /&gt;Con.Open();&lt;br /&gt;SqlCommand Com = new SqlCommand();&lt;br /&gt;Com.CommandText = "select * from Employee";&lt;br /&gt;Com.Connection = Con;&lt;br /&gt;SqlDataAdapter Adap = new SqlDataAdapter(Com);&lt;br /&gt;DataSet ds = new DataSet();&lt;br /&gt;Adap.Fill(ds);&lt;br /&gt;GridView1.DataSource = ds;&lt;br /&gt;GridView1.DataBind();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step5&lt;/b&gt;: - this is the most important step.&lt;br /&gt;&lt;br /&gt;In this step just add &lt;b&gt;RowDataBound&lt;/b&gt; event of the GridView control to the &lt;b&gt;WebForm.aspx.cs&lt;/b&gt; file and add the below code snippet to change the color of the GridView cells according to some condition.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)&lt;br /&gt;{&lt;br /&gt;if (e.Row.RowType == DataControlRowType.DataRow)&lt;br /&gt;{&lt;br /&gt;double Salary = Convert.ToDouble(Convert.ToString(DataBinder.Eval(e.Row.DataItem,"Emp_Salary")));&lt;br /&gt;if (Salary &amp;gt; 10000)&lt;br /&gt;{&lt;br /&gt;e.Row.Cells[4].BackColor = System.Drawing.Color.Red;&lt;br /&gt;}&lt;br /&gt;else&lt;br /&gt;{&lt;br /&gt;e.Row.Cells[4].BackColor = System.Drawing.Color.Green;&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;In the above code snippet you can see that I have just created a variablecalled Salary as double which is containing the value of the Emp_Salary column and I have used that variable Salary to give some condition on which the color of the cell of GridView control is going to change.&lt;br /&gt;&lt;p&gt;As soon as you have completed all the above steps now just run your application&lt;br /&gt;you will see result like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-EO3u3q_6bLQ/TnCt9gqWrvI/AAAAAAAADZA/A-FccyzF7Xk/s400/5.JPG" border="0" height="288" width="451" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the above result you can clearly see that now the cells color of the GridView has been changed according to the given condition.&lt;br /&gt;&lt;br /&gt;View a video on Windows Authentication as follows: -&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/6dKo_bFO8hk?hd=1"&gt;&lt;img src="http://2.bp.blogspot.com/-cNzXcu0WzL4/TnCumXSGpsI/AAAAAAAADZI/Y4W85QPN-0Y/s400/6.JPG" border="0" height="390" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET and ASP.NET interview questions &lt;/a&gt;for preparation of real time interviews.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Get more from author’s blogs for &lt;a target="_blank" href="http://dotnetinterviewquestions.blog.co.in/2011/09/14/net-and-asp-net-interview-questions-changing-cells-color-of-gridview-according-to-some-condition/"&gt;.NET and ASP.NET interview questions&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-1254407338652820869?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/1254407338652820869/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=1254407338652820869' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1254407338652820869'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1254407338652820869'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-and-aspnet-interview-questions-how.html' title='.NET and ASP.NET interview questions: - How to change cells color of GridView according to some condition?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-HWbsUIlGAOo/TnCs_V98pwI/AAAAAAAADYg/c_9ooDQ8OEY/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5952570601249809678</id><published>2011-09-13T06:20:00.000-07:00</published><updated>2011-09-13T07:08:56.469-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Checked'/><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>.NET interview questions: - What is the use of checked and unchecked keyword in C#?</title><content type='html'>&lt;p&gt;&lt;b&gt;Checked&lt;/b&gt;: -The checked keyword is used to explicitly enable overflow&lt;br /&gt;checking for integral-type arithmetic operations and conversions.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Unchecked&lt;/b&gt;: - The unchecked keyword is used to suppress overflow-checking&lt;br /&gt;for integral-type arithmetic operations and conversions.&lt;br /&gt;&lt;br /&gt;Now, let’s create a small console application and try to demonstrate the use of&lt;br /&gt;both the keywords (&lt;b&gt;checked&lt;/b&gt; and &lt;b&gt;unchecked&lt;/b&gt;).&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-2qeqXN8ijsk/Tm9ZFpmyAwI/AAAAAAAADXY/gqRyh4MeIzs/s400/1.JPG" border="0" height="137" width="628" /&gt;&lt;/p&gt;&lt;img src="http://1.bp.blogspot.com/-8CY8eAXI56E/Tm9ZQAD_2sI/AAAAAAAADXg/7Cs_r0kKqBQ/s400/2.JPG" border="0" height="52" width="628" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Now, for demonstration purpose let’s take “&lt;b&gt;int&lt;/b&gt;” data type and see what&lt;br /&gt;the maximum value it can hold.&lt;br /&gt;&lt;br /&gt;Add the below code snippet in to your application to known the maximum value can&lt;br /&gt;be hold by the &lt;b&gt;int&lt;/b&gt; data type.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class Program&lt;br /&gt;{&lt;br /&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;Console.WriteLine(int.MaxValue);&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;The below diagram shows the exact value can be hold by “&lt;b&gt;int&lt;/b&gt;” data type.&lt;br /&gt;&lt;p&gt;&lt;img src="http://2.bp.blogspot.com/-09jo8kZZKmY/Tm9Zj-Ax8YI/AAAAAAAADXo/gSzU2yNgqDU/s400/3.JPG" border="0" height="112" width="610" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, let’s see where the checked keyword can help us in making your code more&lt;br /&gt;useful.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class Program&lt;br /&gt;{&lt;br /&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;int x = 2147483647;&lt;br /&gt;int y = 2147483647;&lt;br /&gt;&lt;br /&gt;int z = x + y;&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;In the above code snippet you can see that I have tried to add extra value to the “z” variable which is of “int” data type and it can hold only “2147483647” value, now let’s see what happen when we try to do that.&lt;br /&gt;&lt;p&gt;&lt;img src="http://3.bp.blogspot.com/-lpAQjjr4Tjo/Tm9ZpmpH_SI/AAAAAAAADXw/4RkqDvDPnUA/s400/4.JPG" border="0" height="70" width="590" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;This is somewhat we were not expecting your expectation was the compiler should&lt;br /&gt;throw some error (overflow) or exception.&lt;br /&gt;&lt;br /&gt;Checked keyword helps us to achieve this like below code snippet.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class Program&lt;br /&gt;{&lt;br /&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;int x = 2147483647;&lt;br /&gt;int y = 2147483647;&lt;br /&gt;&lt;br /&gt;int z = checked(x + y);&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Now, when you run your application the compiler will raise an error like below diagram.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-5QMB6zDG6Lk/Tm9ZukAGw6I/AAAAAAAADX4/rwt1e7b8mHo/s400/5.JPG" border="0" height="165" width="628" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;In simple words the checked keyword is used in scenarios where you want to&lt;br /&gt;ensure that your left hand side data type is not getting overflow.&lt;br /&gt;&lt;br /&gt;Now, let’s see what the use of unchecked keyword is.&lt;br /&gt;&lt;br /&gt;Note: In simple words the unchecked keyword behaves almost the same way as the&lt;br /&gt;default behavior of the compiler.&lt;br /&gt;&lt;br /&gt;Let’s prove that the above point by a simple demonstration.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class Program&lt;br /&gt;{&lt;br /&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;int x = 2147483647;&lt;br /&gt;int y = 2147483647;&lt;br /&gt;&lt;br /&gt;int z = unchecked(x + y);&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;In above code snippet you can see that I have just added the unchecked keyword in front of the arithmetic expression of the z variable.&lt;br /&gt;&lt;p&gt;Now, just run your application by putting a small debug pointer and later just&lt;br /&gt;move your mouse pointer to the “z” variable you will find output like below&lt;br /&gt;diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-lGzOss9Ig6c/Tm9Z5zwK_AI/AAAAAAAADYA/iQoqokOT79w/s400/6.JPG" border="0" height="77" width="633" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;So this prove your above point that the unchecked keyword works almost same as&lt;br /&gt;the default compiler works, now the question comes here is that when the default&lt;br /&gt;compiler works same as unchecked keyword then what is the exact use of it.&lt;br /&gt;&lt;br /&gt;Now, let’s see a simple demonstration to know what the exact use of unchecked&lt;br /&gt;keyword is.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class Program&lt;br /&gt;{&lt;br /&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;const int x = 2147483647;&lt;br /&gt;const int y = 2147483647;&lt;br /&gt;&lt;br /&gt;int z = x + y;&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;In the above code snippet you can see that I have declared variable x and y as const int. now, let’s try to compile this code and see that what the compiler has to say about it.&lt;br /&gt;&lt;p&gt;&lt;img src="http://1.bp.blogspot.com/-YEqx5KqCazU/Tm9aEDDnSeI/AAAAAAAADYI/ny3NhE4LUJg/s400/7.JPG" border="0" height="122" width="633" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;I f you want to bypass this behavior then unchecked keyword will help you to achieve this like below code snippet.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class Program&lt;br /&gt;{&lt;br /&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;const int x = 2147483647;&lt;br /&gt;const int y = 2147483647;&lt;br /&gt;&lt;br /&gt;int z =unchecked(x + y);&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Now, when you compile this code you will see that the compiler doesn’t throw any error like below diagram.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-RPWQqEphIOA/Tm9aJzPL1rI/AAAAAAAADYQ/BIQjzztIGEo/s400/8.JPG" border="0" height="217" width="624" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Conclusion:&lt;br /&gt;&lt;br /&gt;Use checked keyword when you want to ensure that there is no overflow happening.&lt;br /&gt;&lt;br /&gt;Use unchecked keyword when you want to bypass the default behavior of the&lt;br /&gt;constant type checking.&lt;br /&gt;&lt;br /&gt;Can also view video on use of checked and unchecked keyword in .NET as follows:&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/JNwvVrK_y-I?hd=1"&gt;&lt;img src="http://4.bp.blogspot.com/-gdcpkn_W0SQ/Tm9aSGvizhI/AAAAAAAADYY/u419f5eiwwM/s400/9.JPG" border="0" height="392" width="643" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;View more &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Visit for more author’s &lt;a target="_blank" href="http://dotnetinterviewquestion.wordpress.com/2011/09/13/net-interview-questions-how-can-you-explain-uses-of-checked-and-unchecked-keyword-in-c/"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5952570601249809678?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5952570601249809678/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5952570601249809678' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5952570601249809678'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5952570601249809678'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-interview-questions-what-is-use-of.html' title='.NET interview questions: - What is the use of checked and unchecked keyword in C#?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-2qeqXN8ijsk/Tm9ZFpmyAwI/AAAAAAAADXY/gqRyh4MeIzs/s72-c/1.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-8647929954789294747</id><published>2011-09-12T06:04:00.000-07:00</published><updated>2011-09-12T06:21:24.401-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='hashtable'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>.NET interview questions: - What are hashtable collections?</title><content type='html'>In arraylist or array if we have to access any data we need to use the internal index id generated by the array list collection. For instance the below code snippet shows how the internal id is used to fetch data from array list.&lt;br /&gt;&lt;p&gt;In actual scenarios we hardly remember internal id’s generated by collection we&lt;br /&gt;would like to fetch the data by using some application defined key. There’s&lt;br /&gt;where hash table comes in to picture.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;string str = MyList[1].ToString();&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;Hash table helps to locate data using keys as shown below. When we add data to hash table it also has a provision where we can add key with the data. This key will help us to fetch data later rather than using internal index id’s generated by collections.&lt;br /&gt;&lt;pre&gt;objHashtable.Add(“p001”,”MyData”);&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;This key is converted in to numeric hash value which is mapped with the key&lt;br /&gt;for quick lookup.&lt;br /&gt;&lt;/p&gt;View the following video on CAS, evidence, permission set &amp;amp; code groups: -&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;a target="_blank" href="http://youtu.be/qNnOi5xi9KM?hd=1"&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-rf3tYh15zLQ/Tm4Df1fHQYI/AAAAAAAADXA/EF12E-6OdHE/s400/1.JPG" border="0" height="391" width="648" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get more learning materials for &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Visit author’s blog for more &lt;a target="_blank" href="http://dotnetinter.livejournal.com/41666.html"&gt; .NET interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-8647929954789294747?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/8647929954789294747/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=8647929954789294747' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8647929954789294747'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8647929954789294747'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-interview-questions-what-are.html' title='.NET interview questions: - What are hashtable collections?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-rf3tYh15zLQ/Tm4Df1fHQYI/AAAAAAAADXA/EF12E-6OdHE/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-3204951516541118995</id><published>2011-09-10T06:30:00.000-07:00</published><updated>2011-09-10T07:03:16.973-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Constant'/><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Readonly'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>C# and .NET interview questions: - What is the difference between Constant and ReadOnly in C#?</title><content type='html'>&lt;b&gt;Const&lt;/b&gt;: - The const keyword is used to modify a declaration of a field or local variable. It specifies that the value of the field or the local variable cannot be modified.&lt;br /&gt;&lt;p&gt;&lt;b&gt;Example&lt;/b&gt;: public const double x = 1.0;&lt;br /&gt;public const int y=10;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;ReadOnly&lt;/b&gt;: - The readonly keyword is a modifier that you can use on fields. When a field declaration includes a readonly modifier, assignments to the fields introduced by the declaration can only occur as part of the declaration or in a constructor in the same class.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Example&lt;/b&gt;: public readonly int y = 5;&lt;br /&gt;public readonly string x;&lt;br /&gt;&lt;br /&gt;Both &lt;b&gt;Constant&lt;/b&gt; and &lt;b&gt;ReadOnly&lt;/b&gt; keywords are used to deal with constant value but the difference in both is that the value of readonly variables is set at runtime, so it can have different value for different execution of the program. Whereas the value of constant variables is set during compile time.&lt;br /&gt;&lt;br /&gt;Let’s see a small demonstration to prove the above difference between the&lt;br /&gt;declarations of both the keywords.&lt;br /&gt;&lt;br /&gt;Let me first define a variable using Constant keyword without assigning any&lt;br /&gt;value to it and later try to compile the code and see that what the compiler has&lt;br /&gt;to say about it.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;public class MyClass&lt;br /&gt;{&lt;br /&gt;public const double JanDays;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;In the above code snippet you can clearly see that I have created a variable&lt;br /&gt;as constant without assigning value to it, now let’s try to compile it.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-vxPjXCIuG2Q/Tmtm5AjhDSI/AAAAAAAADWY/eTTwyqZkvCY/s400/1.JPG" border="0" height="104" width="580" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now, let’s see a simple example of creating a variable with readonly keyword&lt;br /&gt;without assigning value to it and try to compile it and see that what the&lt;br /&gt;compiler has to say about it.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;public class MyClass&lt;br /&gt;{&lt;br /&gt;public readonly double FebuaryDays;&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;In the above code snippet you can see that I have declared variable using readonly keyword without assigning value to it, now let’s try to compile it.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-bYOHS6Z97w4/TmtnAr2jqnI/AAAAAAAADWg/bxrCogY5if4/s400/2.JPG" border="0" height="152" width="560" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;From the above diagram it’s clearly clear that the variables which are defined&lt;br /&gt;with readonly keyword can have value during execution time but the value for the&lt;br /&gt;variables which are defined with constant keyword should have value during&lt;br /&gt;compile time only.&lt;br /&gt;&lt;br /&gt;When you create a variable with using readonly keyword this means that the value&lt;br /&gt;to that variable can only be given inside the constructor.&lt;br /&gt;&lt;br /&gt;Let’s see a small demonstration to prove the above point.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;public class MyClass&lt;br /&gt;{&lt;br /&gt;public readonly int FebDays;&lt;br /&gt;&lt;br /&gt;public void MyMethod()&lt;br /&gt;{&lt;br /&gt;FebDays = 20;&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;In the above code you can see that I have created a variable using readonly keyword and also created a method “MyMethod” which is assigning value to the readonly variable. Now, let’s try to compile the code and see that what the compiler has to say about this.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-F_IKu2QUqz8/TmtnFKDAW0I/AAAAAAAADWo/N0oPejBBErA/s400/3.JPG" border="0" height="103" width="543" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;In the above diagram you can clearly see that the compiler throws an error. Which means the value to the readonly fields cannot be assigned inside the method.&lt;br /&gt;&lt;br /&gt;Now, let’s try to assign a value to the readonly variable through the constructor and see that what the compiler has to say about that.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;public class MyClass&lt;br /&gt;{&lt;br /&gt;public readonly int FebDays;&lt;br /&gt;&lt;br /&gt;public MyClass()&lt;br /&gt;{&lt;br /&gt;FebDays = 29;&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;In the above code snippet you can see that I have created a constructor which is assigning value to the readonly variable. Now let’s compile the code and see what the compiler says.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-MsNkMPh3AHk/TmtnLfAovdI/AAAAAAAADWw/rnirRXrYFLw/s400/4.JPG" border="0" height="105" width="552" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;From the above diagram it’s clear that you can assign value to the readonly&lt;br /&gt;variable in the constructor.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Watch video on different types of collection in .NET and C# as follows: -&lt;br /&gt;&lt;/p&gt;&lt;a target="_blank" href="http://youtu.be/hDykzD-3z8k?hd=1"&gt;&lt;img src="http://4.bp.blogspot.com/-vVsokAlayao/TmtnRtw0PDI/AAAAAAAADW4/VPnpATQtIvQ/s400/5.JPG" border="0" height="391" width="645" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Get more materials on &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;&lt;/p&gt;Regards,&lt;br /&gt;&lt;p&gt;&lt;br /&gt;See more stuffs on author’s blog for &lt;a target="_blank" href="http://questpond.blog.com/2011/09/10/c-and-net-interview-questions-state-the-difference-between-constant-and-readonly-in-c/"&gt;.NET interview questions&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-3204951516541118995?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/3204951516541118995/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=3204951516541118995' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3204951516541118995'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/3204951516541118995'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/c-and-net-interview-questions-what-is_10.html' title='C# and .NET interview questions: - What is the difference between Constant and ReadOnly in C#?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-vxPjXCIuG2Q/Tmtm5AjhDSI/AAAAAAAADWY/eTTwyqZkvCY/s72-c/1.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-9126971512682206514</id><published>2011-09-09T05:34:00.000-07:00</published><updated>2011-09-09T05:47:14.323-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='authentication'/><title type='text'>C# and .NET interview questions: - Explain windows, forms and passport authentication?</title><content type='html'>&lt;p&gt;There are 3 major ways of doing authentication and authorization:&lt;br /&gt;&lt;br /&gt;• Windows: - In this mode the users are stored in windows local user groups.&lt;br /&gt;&lt;br /&gt;• Forms: - In this mode we create a login screen and use the formsauthentication&lt;br /&gt;class to do validations. It’s a ticket based authentication.&lt;br /&gt;&lt;br /&gt;• Passport :-In this mode the users are validated from Microsoft sites like&lt;br /&gt;hotmail , devhood , MSN etc , ticket is generated and that ticket can be used to&lt;br /&gt;do authentication and authorization in your web application.&lt;br /&gt;&lt;br /&gt;Watch video on different types of collection in .NET and C#: -&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/hDykzD-3z8k?hd=1"&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-VbPX4NP-IH8/TmoIDU1OyvI/AAAAAAAADWI/p-KFkw_H83o/s400/1.JPG" border="0" height="303" width="473" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get more materials on &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;See more stuffs on author’s blog for &lt;a target="_blank" href="http://questpond.over-blog.com/article-c-and-net-interview-questions---state-what-is-windows-forms-and-passport-authentication-83791971.html"&gt;.NET interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-9126971512682206514?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/9126971512682206514/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=9126971512682206514' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/9126971512682206514'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/9126971512682206514'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/c-and-net-interview-questions-explain.html' title='C# and .NET interview questions: - Explain windows, forms and passport authentication?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-VbPX4NP-IH8/TmoIDU1OyvI/AAAAAAAADWI/p-KFkw_H83o/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-910716985803936336</id><published>2011-09-09T05:18:00.000-07:00</published><updated>2011-09-09T05:18:07.124-07:00</updated><title type='text'>StaticKeyword.mp4</title><content type='html'>&lt;iframe width="480" height="295" src="http://www.youtube.com/embed/xByUSk-5sRs?fs=1" frameborder="0" allowFullScreen=""&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;p&gt;for more .net and c# interview questions videos click on &lt;a href="http://www.questpond.com"&gt;.NET and c# interview questions &lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-910716985803936336?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/910716985803936336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=910716985803936336' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/910716985803936336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/910716985803936336'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/statickeywordmp4.html' title='StaticKeyword.mp4'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/xByUSk-5sRs/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-1679917446575997627</id><published>2011-09-09T03:58:00.000-07:00</published><updated>2011-09-09T03:58:52.238-07:00</updated><title type='text'>c#  interview questions :- Prove that  only 1 instance of the object is ...</title><content type='html'>&lt;iframe width="480" height="295" src="http://www.youtube.com/embed/N9xwjZ4mMvw?fs=1" frameborder="0" allowFullScreen=""&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;p&gt;for more .net and c# interview questions videos click on &lt;a href="http://www.questpond.com"&gt;.NET and c# interview questions &lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-1679917446575997627?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/1679917446575997627/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=1679917446575997627' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1679917446575997627'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1679917446575997627'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/c-interview-questions-prove-that-only-1.html' title='c#  interview questions :- Prove that  only 1 instance of the object is ...'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/N9xwjZ4mMvw/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-581929967481250210</id><published>2011-09-08T11:14:00.000-07:00</published><updated>2011-09-08T11:32:40.611-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Webservices'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF'/><title type='text'>WCF interview questions: - What is the difference between WCF and Web services?</title><content type='html'>&lt;p&gt;• WCF services can be hosted in multiple protocols like http, TCP etc. Web&lt;br /&gt;services can only be hosted on Http protocol.&lt;br /&gt;&lt;br /&gt;• WCF has COM+ so you can call two different WCF services in a transaction, we&lt;br /&gt;can not call two different web services in one transaction.&lt;br /&gt;&lt;br /&gt;• WCF integrates with MSMQ, for web services we will need to write code.&lt;br /&gt;&lt;br /&gt;In simple words below equation shows the difference with simple equation.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;WCF = Web services + Remoting + MSMQ + COM+&lt;br /&gt;Web service = WCF – (Remoting + MSMQ + COM+ )&lt;/pre&gt;&lt;br /&gt;Watch video on that How Can we do WCF Concurrency and throttling: -&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;a target="_blank" href="http://youtu.be/qUxahuYp2X8?hd=1"&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-kZbavCk6HzE/TmkIYaMJ6NI/AAAAAAAADWA/G0uTJEzWlco/s400/1.JPG" border="0" height="392" width="641" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;Get more materials on&lt;a target="_blank" href="http://www.questpond.com/"&gt; WCF interview questions&lt;/a&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;See more stuffs on author’s blog for &lt;a target="_blank" href="http://dotnetinterviewquestion.wordpress.com/2011/09/08/wcf-interview-questions-what-is-the-difference-between-wcf-and-web-services/"&gt;WCF interview questions &lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-581929967481250210?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/581929967481250210/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=581929967481250210' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/581929967481250210'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/581929967481250210'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/wcf-interview-questions-what-is.html' title='WCF interview questions: - What is the difference between WCF and Web services?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-kZbavCk6HzE/TmkIYaMJ6NI/AAAAAAAADWA/G0uTJEzWlco/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5080957331630827636</id><published>2011-09-07T07:33:00.000-07:00</published><updated>2011-09-07T11:25:03.769-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='abstract class'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='Interface'/><title type='text'>C# and .NET interview questions: - Differences between abstract class and interface?</title><content type='html'>&lt;p&gt;&lt;b&gt;Differences between abstract class and Interface is as below:-&lt;br /&gt;&lt;/b&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Implementation&lt;/b&gt; -&lt;b&gt; In Abstract class  &lt;/b&gt;some methods in abstract classes can have implementation and  &lt;b&gt;In Interface a&lt;/b&gt;ll methods, function, properties in interfaces have to  empty compulsorily.&lt;/p&gt;&lt;b&gt;Scenario-&lt;/b&gt;&lt;b&gt; In Abstract class a&lt;/b&gt;bstract classes are used when we want to share common functionality in parent child relationship and&lt;b&gt; In Interface -&lt;/b&gt; Interfaces are used to define contract, enforce standardization, decoupling and dynamic polymorphism.&lt;b&gt;&lt;br /&gt;&lt;br /&gt;Variable declaration-&lt;/b&gt;&lt;b&gt; In Abstract class w&lt;/b&gt;e can declare variables and &lt;b&gt; In Interface &lt;/b&gt; we cannot do that.&lt;br /&gt;&lt;p&gt;&lt;b&gt;Inheritance vs Implementation&lt;/b&gt;-Abstract classes are inherited and &lt;b&gt;Interface &lt;/b&gt; are implemented.&lt;b&gt;&lt;br /&gt;&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;Watch video on regular expression with practical demonstration as follows: -&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/C2zm0roE-Uc?hd=1"&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-fUO8nYU3_j0/TmeA_R96gsI/AAAAAAAADVo/PXJrkD54nQo/s400/1.JPG" border="0" height="391" width="643" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;Get more materials on &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;See more stuffs on author’s blog for &lt;a target="_blank" href="http://dotnetinter.livejournal.com/40371.html"&gt;.NET interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5080957331630827636?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5080957331630827636/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5080957331630827636' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5080957331630827636'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5080957331630827636'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/c-and-net-interview-questions.html' title='C# and .NET interview questions: - Differences between abstract class and interface?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-fUO8nYU3_j0/TmeA_R96gsI/AAAAAAAADVo/PXJrkD54nQo/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-995063681664611980</id><published>2011-09-07T05:07:00.000-07:00</published><updated>2011-09-07T05:07:15.065-07:00</updated><title type='text'>.NET and C# interview questions</title><content type='html'>http://computerauthor.blogspot.com/2011/09/16-important-net-and-c-interview.html&lt;br /&gt;&lt;p&gt;for more .net and c# interview questions videos click on &lt;a href="http://www.questpond.com"&gt;.NET and c# interview questions &lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-995063681664611980?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/995063681664611980/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=995063681664611980' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/995063681664611980'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/995063681664611980'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-and-c-interview-questions.html' title='.NET and C# interview questions'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-5766726077812846045</id><published>2011-09-07T04:48:00.000-07:00</published><updated>2011-09-07T06:37:36.507-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='S'/><category scheme='http://www.blogger.com/atom/ns#' term='.net interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='WCF Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>16 important .NET and C# interview questions</title><content type='html'>1.Can you explain Method of Sorting GridViewcontrol in ASP.NET?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_aspnet-interview-questions:-can-you-explain-method-of-sorting-gridviewcontrol-in-aspnet_4.html"&gt;http://www.dotnetinterviewquestions.in/article_aspnet-interview-questions:-can-you-explain-method-of-sorting-gridviewcontrol-in-aspnet_4.html&lt;/a&gt;=======================================================================================&lt;br /&gt;2.Explain anonymous methods in .NET?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_c-interview-questions:-explain-anonymous-methods-in-net_5.html"&gt;http://www.dotnetinterviewquestions.in/article_c-interview-questions:-explain-anonymous-methods-in-net_5.html&lt;/a&gt;======================================================================================&lt;br /&gt;3.Data exporting from GridView to Excel&lt;br /&gt;&lt;br /&gt;&lt;a href="http://http://www.dotnetinterviewquestions.in/article_net-and-aspnet-interview-questions:-data-exporting-from-gridview-to-excel_8.html"&gt;http://www.dotnetinterviewquestions.in/article_net-and-aspnet-interview-questions:-data-exporting-from-gridview-to-excel_8.html&lt;/a&gt;=======================================================================================&lt;br /&gt;4.Define Named and Optional Arguments?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_c-and-net-interview-"&gt;http://www.dotnetinterviewquestions.in/article_c-and-net-interview-&lt;br /&gt;question:-define-named-and-optional-arguments_10.html&lt;/a&gt;&lt;br /&gt;======================================================================================&lt;br /&gt;5. Describe Multi-targeting in .NET?&lt;br /&gt;           &lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_c-and-net-framework-interview-questions:-describe-multi-targeting-in-net_1.html"&gt;http://www.dotnetinterviewquestions.in/article_c-and-net-framework-interview-questions:-describe-multi-targeting-in-net_1.html&lt;/a&gt;======================================================================================&lt;br /&gt;6.Two Methods that explains to back-up SQL Server Database and Restore Database?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_sql-server-interview-questions:-two-methods-that-explains-to-back-up-sql-server-database-and-restore-database_3.html"&gt;http://www.dotnetinterviewquestions.in/article_sql-server-interview-questions:-two-methods-that-explains-to-back-up-sql-server-database-and-restore-database_3.html&lt;/a&gt;======================================================================================&lt;br /&gt;7. Explain the term various modes of storing ASP.NET session?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_aspnet-interview-questions:-explain-the-term-various-modes-of-storing-aspnet-session_7.html"&gt;http://www.dotnetinterviewquestions.in/article_aspnet-interview-questions:-explain-the-term-various-modes-of-storing-aspnet-session_7.html&lt;/a&gt;======================================================================================&lt;br /&gt;8.What is use the of SN.EXE?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_net-interview-questions:-what-is-use-the-of-snexe_6.html"&gt;http://www.dotnetinterviewquestions.in/article_net-interview-questions:-what-is-use-the-of-snexe_6.html&lt;/a&gt;======================================================================================&lt;br /&gt;9.How will you describe the benefits and limitations of using Cookies?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_aspnet-interview-questions:-how-will-you-describe-the-benefits-and-limitations-of-using-cookies_9.html"&gt;http://www.dotnetinterviewquestions.in/article_aspnet-interview-questions:-how-will-you-describe-the-benefits-and-limitations-of-using-cookies_9.html&lt;/a&gt;======================================================================================&lt;br /&gt;10.Five most important SharePoint 2010 interview questions&lt;br /&gt;    &lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_five-most-important-sharepoint-2010-interview-questions_2.html"&gt;http://www.dotnetinterviewquestions.in/article_five-most-important-sharepoint-2010-interview-questions_2.html&lt;/a&gt;=======================================================================================&lt;br /&gt;Prove that anonymous Types better than Tuples.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_net-interview-questions:-prove-that-anonymous-types-better-than-tuples_13.html"&gt;http://www.dotnetinterviewquestions.in/article_net-interview-questions:-prove-that-anonymous-types-better-than-tuples_13.html&lt;/a&gt;========================================================================================&lt;br /&gt;Different types anonymous and their practical use?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_net-interview-questions:-different-types-anonymous-and-their-practical-use_12.html"&gt;http://www.dotnetinterviewquestions.in/article_net-interview-questions:-different-types-anonymous-and-their-practical-use_12.html&lt;/a&gt;=======================================================================================&lt;br /&gt;Find the Age of an Employee whose Age is greater than 30 using SQL query.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_sql-server-interview-questions:-find-the-age-of-an-employee-whose-age-is-greater-than-30-using-sql-query_14.html"&gt;http://www.dotnetinterviewquestions.in/article_sql-server-interview-questions:-find-the-age-of-an-employee-whose-age-is-greater-than-30-using-sql-query_14.html&lt;/a&gt;=======================================================================================&lt;br /&gt;Adding your window application icon to the task bar ?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_net-interview-question:-adding-your-window-application-icon-to-the-task-bar-_17.html"&gt;http://www.dotnetinterviewquestions.in/article_net-interview-question:-adding-your-window-application-icon-to-the-task-bar-_17.html&lt;/a&gt;========================================================================================&lt;br /&gt;Method of parsing values from string.&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_net-interview-questions:-method-of-parsing-values-from-string_11.html"&gt;http://www.dotnetinterviewquestions.in/article_net-interview-questions:-method-of-parsing-values-from-string_11.html&lt;/a&gt;========================================================================================&lt;br /&gt;How will you implement interface with same method name in C#?&lt;br /&gt;&lt;br /&gt;&lt;a href="http://www.dotnetinterviewquestions.in/article_c-and-net-interview-question-how-will-you-implement-interface-with-same-method-name-in-c_16.html"&gt;http://www.dotnetinterviewquestions.in/article_c-and-net-interview-question-how-will-you-implement-interface-with-same-method-name-in-c_16.html&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-5766726077812846045?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/5766726077812846045/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=5766726077812846045' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5766726077812846045'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/5766726077812846045'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/16-important-net-and-c-interview.html' title='16 important .NET and C# interview questions'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-8027487091772212280</id><published>2011-09-06T07:22:00.000-07:00</published><updated>2011-09-06T07:40:06.029-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Dataset'/><category scheme='http://www.blogger.com/atom/ns#' term='Ado.Net Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='Ado.Net'/><category scheme='http://www.blogger.com/atom/ns#' term='Datareader'/><title type='text'>ADO.NET interview questions: - Can you explain connection, command, datareader and dataset in ADO.NET?</title><content type='html'>&lt;p&gt;• &lt;b&gt;Connection&lt;/b&gt;: - This object creates a connection to the database. If you&lt;br /&gt;want to do any operation on the database you have to first create a connection&lt;br /&gt;object.&lt;br /&gt;&lt;br /&gt;• &lt;b&gt;Command&lt;/b&gt;: - This object helps us to execute SQL queries against&lt;br /&gt;database. Using command object we can execute select, insert, update and delete&lt;br /&gt;SQL command.&lt;br /&gt;&lt;br /&gt;• &lt;b&gt;Data reader&lt;/b&gt;: - This provides a recordset which can be browsed only in&lt;br /&gt;forward direction. It can only be read but not updated. Data reader is good for&lt;br /&gt;large number of records where you want to just browse quickly and display it.&lt;br /&gt;&lt;br /&gt;• &lt;b&gt;Dataset object&lt;/b&gt;: - This provides a recordset which can be read back and&lt;br /&gt;in forward direction. The recordset can also be updated. Dataset is like a in&lt;br /&gt;memory database with tables, rows and fields.&lt;br /&gt;&lt;br /&gt;• &lt;b&gt;Data Adapter&lt;/b&gt;: - This object acts as a bridge between database and&lt;br /&gt;dataset; it helps to load the dataset object.&lt;br /&gt;&lt;br /&gt;Know more on calling a stored procedure using LINQ by viewing the following&lt;br /&gt;video: -&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/rL4tqiaDwmM"&gt;&lt;img src="http://3.bp.blogspot.com/-Fsfm-U3EzJg/TmYttcKJwtI/AAAAAAAADVg/QkBcSeRI7R8/s400/1.JPG" border="0" height="390" width="646" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Get more &lt;a target="_blank" href="http://www.questpond.com/"&gt;ADO.NET interview questions&lt;/a&gt; for preparation.&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Visit author’s other blogs on &lt;a target="_blank" href="http://www.dotnetinterviewquestions.in/article_adonet-interview-questions:-state-the-meaning-of-connection-command-datareader-and-dataset-in-adonet_27.html"&gt;ADO.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-8027487091772212280?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/8027487091772212280/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=8027487091772212280' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8027487091772212280'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8027487091772212280'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/adonet-interview-questions-can-you.html' title='ADO.NET interview questions: - Can you explain connection, command, datareader and dataset in ADO.NET?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-Fsfm-U3EzJg/TmYttcKJwtI/AAAAAAAADVg/QkBcSeRI7R8/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-529204975461283098</id><published>2011-09-05T06:52:00.000-07:00</published><updated>2011-09-05T07:12:54.664-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Delay Signing'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>.NET interview questions: - Explain Delay signing in .NET?</title><content type='html'>&lt;p&gt;The whole point about strong names is to ensure that the clients (UI, External&lt;br /&gt;components etc) who is consuming the DLL knows that the DLL was published from a&lt;br /&gt;valid source. This authenticity is verified by using strong names. The strong&lt;br /&gt;name protection is good from external hackers but what if your own developers&lt;br /&gt;think of doing something mischievous.&lt;br /&gt;&lt;br /&gt;That’s where delay signing helps. The strong name key has two keys public key&lt;br /&gt;and private key. You only share the public key with your developers so that they&lt;br /&gt;can work seamlessly. The private key is stored in a secured location and when&lt;br /&gt;the DLL is about to be deployed on production the key is injected for further&lt;br /&gt;security.&lt;br /&gt;&lt;/p&gt;Also view our video on Garbage Collector, Gen 0, 1 &amp;amp; 2 as follows: -&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://www.youtube.com/embed/gC8NdlOeNEs"&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-JSkTjOA4_AA/TmTUK_rweYI/AAAAAAAADVY/KHJgA4_aIu4/s400/1.JPG" border="0" height="305" width="471" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get our more article on &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;See newly added more author’s article on &lt;a target="_blank" href="http://questpond.over-blog.com/article-net-interview-questions-state-what-is-delay-signing-in-net-83427444.html"&gt;.NET interview questions&lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-529204975461283098?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/529204975461283098/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=529204975461283098' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/529204975461283098'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/529204975461283098'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-interview-questions-explain-delay.html' title='.NET interview questions: - Explain Delay signing in .NET?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-JSkTjOA4_AA/TmTUK_rweYI/AAAAAAAADVY/KHJgA4_aIu4/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-1928244804554077938</id><published>2011-09-04T06:17:00.000-07:00</published><updated>2011-09-04T06:39:08.707-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Delegates'/><category scheme='http://www.blogger.com/atom/ns#' term='Events'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>.NET interview questions: - How does delegate differ from an event?</title><content type='html'>&lt;p&gt;This is one of the important and most asked &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;. Delegate is basically an abstract strong pointer to a function or method while events are higher level of encapsulation over delegates.&lt;br /&gt;&lt;br /&gt;Events are used by delegates internally.&lt;br /&gt;&lt;br /&gt;Main differing reasons are as follows:-&lt;br /&gt;&lt;br /&gt;• Actually, events use delegates in bottom. But they add an extra layer on the&lt;br /&gt;delegates, thus forming the publisher and subscriber model.&lt;br /&gt;&lt;br /&gt;• As delegates are function to pointers, they can move across any clients. So&lt;br /&gt;any of the clients can add or remove events, which can be confusing. But events&lt;br /&gt;give the extra protection / encapsulation by adding the layer and making it a&lt;br /&gt;publisher and subscriber model.&lt;br /&gt;&lt;br /&gt;Think that one of your clients doing this&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;c.XyzCallback = null&lt;/pre&gt;This will reset all your delegates to nothing and you have to keep searchingwhere the error is.&lt;br /&gt;&lt;p&gt;See the following video on different types of collection in .NET and C#: -&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://youtu.be/hDykzD-3z8k?hd=1"&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-d9votcvnnk0/TmN6d3ZXSbI/AAAAAAAADVQ/okZqGpr6Nio/s400/1.JPG" border="0" height="392" width="641" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Also see our tutorials on &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;View more author’s blog on &lt;a target="_blank" href="http://dotnetinterviewquestion.wordpress.com/2011/09/04/net-interview-questions-state-the-difference-between-delegate-and-an-event/"&gt; .NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-1928244804554077938?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/1928244804554077938/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=1928244804554077938' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1928244804554077938'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1928244804554077938'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-interview-questions-how-does.html' title='.NET interview questions: - How does delegate differ from an event?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-d9votcvnnk0/TmN6d3ZXSbI/AAAAAAAADVQ/okZqGpr6Nio/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-1290824825069974250</id><published>2011-09-02T06:26:00.000-07:00</published><updated>2011-09-02T06:42:03.330-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='API'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>.NET interview questions: - How can we make Windows API calls in .NET?</title><content type='html'>&lt;p&gt;Windows API calls are not COM based and they are invoked through Platform Invoke&lt;br /&gt;Services.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;Declare StringConversionType (Function | Sub) MethodName Lib "DllName" ([Args]) As Type&lt;/pre&gt;&lt;br /&gt;• StringConversionType is for what type of conversion should take place.Either we can specify Unicode to convert all strings to Unicode values, or Auto to convert strings according to the .NET runtime rules.&lt;br /&gt;&lt;p&gt;• MethodName is the name of the API to call.&lt;br /&gt;&lt;br /&gt;• DllName is the name of the DLL.&lt;br /&gt;&lt;br /&gt;• Args are any arguments to the API call.&lt;br /&gt;&lt;br /&gt;• Type is the return type of the API call.&lt;br /&gt;&lt;br /&gt;Below is a sample code for VB.NET, which uses Sleep windows API for delaying.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;Public Class Form1&lt;br /&gt;Declare Auto Sub Sleep Lib “kernel32.dll” (ByVal dwMilliseconds As Long)&lt;br /&gt;Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load&lt;br /&gt;MessageBox.Show(“ start sleeping for 5000 Milli seconds.....”)&lt;br /&gt;Sleep(5000)&lt;br /&gt;MessageBox.Show(“ end of sleeping.....”)&lt;br /&gt;End Sub&lt;br /&gt;End Class&lt;br /&gt;&lt;br /&gt;#region Using directives&lt;br /&gt;&lt;br /&gt;using System;&lt;br /&gt;using System.Collections.Generic;&lt;br /&gt;using System.ComponentModel;&lt;br /&gt;using System.Data;&lt;br /&gt;using System.Drawing;&lt;br /&gt;using System.Windows.Forms;&lt;br /&gt;using System.Runtime.InteropServices;&lt;br /&gt;#endregion&lt;br /&gt;namespace CSharpCode&lt;br /&gt;{&lt;br /&gt;partial class Form1 : Form&lt;br /&gt;{&lt;br /&gt;[DllImport(“Kernel32.dll”)]&lt;br /&gt;static extern int Sleep(long dwMilliseconds);&lt;br /&gt;public Form1()&lt;br /&gt;{&lt;br /&gt;InitializeComponent();&lt;br /&gt;}&lt;br /&gt;private void Form1_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;MessageBox.Show(“Starting of 5000 ms...”);&lt;br /&gt;Sleep(5000);&lt;br /&gt;MessageBox.Show(“End of 5000 ms...”);&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Also view our video on use of VAR keyword: -&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/VnlCmxBuqFE?hd=1"&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-USriG8sD4Sg/TmDZkoXuKpI/AAAAAAAADVI/AEi4FBdH9Zo/s400/1.JPG" border="0" height="389" width="643" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get more tutorials for &lt;a target="_blank" href="http://www.questpond.com/"&gt;.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;Also view author’s blog for &lt;a target="_blank" href="http://dotnetinterviewquestions.blog.co.in/2011/09/02/net-interview-questions-write-steps-of-making-windows-api-calls-in-net/"&gt;.NET interview questions &lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-1290824825069974250?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/1290824825069974250/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=1290824825069974250' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1290824825069974250'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/1290824825069974250'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/net-interview-questions-how-can-we-make.html' title='.NET interview questions: - How can we make Windows API calls in .NET?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://3.bp.blogspot.com/-USriG8sD4Sg/TmDZkoXuKpI/AAAAAAAADVI/AEi4FBdH9Zo/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-773900054683361521</id><published>2011-09-02T04:16:00.000-07:00</published><updated>2011-09-02T04:16:22.922-07:00</updated><title type='text'>c#  and .NET interview questions :- What is the use of "VAR" keyword in ...</title><content type='html'>&lt;iframe width="480" height="295" src="http://www.youtube.com/embed/VnlCmxBuqFE?fs=1" frameborder="0" allowFullScreen=""&gt;&lt;/iframe&gt;&lt;br /&gt;&lt;p&gt;for more .net and c# interview questions videos click on &lt;a href="http://www.questpond.com"&gt;.NET and c# interview questions &lt;/a&gt;&lt;/p&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-773900054683361521?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/773900054683361521/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=773900054683361521' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/773900054683361521'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/773900054683361521'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/09/c-and-net-interview-questions-what-is.html' title='c#  and .NET interview questions :- What is the use of &quot;VAR&quot; keyword in ...'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://img.youtube.com/vi/VnlCmxBuqFE/default.jpg' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-4492078138661528368</id><published>2011-08-30T10:42:00.000-07:00</published><updated>2011-08-30T11:16:58.483-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Tracing'/><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='Asp.Net Interview Questions'/><title type='text'>ASP.NET interview questions: - How to do Tracing in ASP.NET?</title><content type='html'>&lt;b&gt;Tracing&lt;/b&gt;: - Tracing is a way to monitor the execution of your&lt;b&gt;ASP.NET&lt;/b&gt; application. You can record &lt;b&gt;exception&lt;/b&gt; details and program flow in a way that doesn't affect the program's output.&lt;br /&gt;&lt;p&gt;In simple words when you monitor your application during &lt;b&gt;production&lt;/b&gt; or &lt;b&gt;deployment&lt;/b&gt; phase is called &lt;b&gt;Tracing&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Tracing can be done in the following ways.&lt;br /&gt;&lt;br /&gt;1. &lt;b&gt;Page level:&lt;/b&gt; - Enable &lt;b&gt;tracing&lt;/b&gt; at page level display can be seen on browser.&lt;br /&gt;&lt;br /&gt;2. &lt;b&gt;Web.Config level&lt;/b&gt;: - Enable &lt;b&gt;Tracing&lt;/b&gt; throughout the application.&lt;br /&gt;&lt;/p&gt;Let’s see a simple example on how exactly we can achieve Tracing in your application.&lt;br /&gt;&lt;p&gt;In order to do tracing just follow the following steps.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step1&lt;/b&gt;: - create an ASP.NET Web Application for that just Go To &amp;gt; File &amp;gt;&lt;br /&gt;New &amp;gt; Project &amp;gt; Web &amp;gt; ASP.NET Empty Web Application.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://4.bp.blogspot.com/-_qP92tZCfJ8/Tl0hK1UlrqI/AAAAAAAADUI/n8XSGroSdc0/s400/1.JPG" border="0" height="140" width="628" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://2.bp.blogspot.com/-t7Gd0Vw2l4M/Tl0hLK8GM5I/AAAAAAAADUQ/nnZMVxjc9CY/s400/2.JPG" border="0" height="40" width="628" /&gt;&lt;/p&gt;&lt;br /&gt;Now just add a form to the application for that just right click on the application &amp;gt; Add &amp;gt; Add New Item &amp;gt; Select Web Form.&lt;br /&gt;&lt;p&gt;&lt;img src="http://3.bp.blogspot.com/-5XMuLtTpvsk/Tl0hLFGrsMI/AAAAAAAADUY/WA07B5jfi2I/s400/3.JPG" border="0" height="42" width="628" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Add three buttons on the WebForm.aspx page like below diagram.&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://3.bp.blogspot.com/-LEsW3Ygv-Go/Tl0hLVICU6I/AAAAAAAADUg/6lCkX4txri0/s400/4.JPG" border="0" height="81" width="257" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step2&lt;/b&gt;: - Add the below code snippet in WebForm1.aspx.cs page.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;using System.Diagnostics;&lt;br /&gt;&lt;br /&gt;namespace TracingApplication&lt;br /&gt;{&lt;br /&gt;public partial class WebForm1 : System.Web.UI.Page&lt;br /&gt;{&lt;br /&gt;Random obj = new Random();// created random object&lt;br /&gt;int intRandom = 0;&lt;br /&gt;protected void Page_Load(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;intRandom = obj.Next(5);// initialized value to the intRandom variable.&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;protected void Button1_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;Trace.Warn("Button1 has been clicked");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;protected void Button2_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;Trace.Warn("Button2 has been clicked");&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;protected void Button3_Click(object sender, EventArgs e)&lt;br /&gt;{&lt;br /&gt;Trace.Warn("Button3 has been clicked");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step3&lt;/b&gt;: - Now let’s see how you can achieve &lt;b&gt;Page level Tracing.&lt;/b&gt;&lt;br /&gt;&lt;/p&gt;ASP.NET tracing can be enabled on a page-by-page basis by adding "Trace=true" to the Page directive in any ASP.NET page:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;%@ Page Language="C#" Trace="true" AutoEventWireup="true"&lt;br /&gt;CodeBehind="WebForm1.aspx.cs"&lt;br /&gt;Inherits="TracingApplication.WebForm1" %&amp;gt;&lt;/pre&gt;&lt;br /&gt;Additionally, you can add the TraceMode attribute that sets SortByCategory or the default, SortByTime. You can use SortByTime to see the methods that take up the most CPU time for your application. You can enable tracing programmatically using the Trace.IsEnabled property.&lt;br /&gt;&lt;p&gt;Now, just run your application you will see output like below diagram.&lt;br /&gt;&lt;/p&gt;&lt;img src="http://4.bp.blogspot.com/-rUoErgJdtYU/Tl0hLXWLtsI/AAAAAAAADUo/M2CwjD33flE/s400/5.JPG" border="0" height="362" width="628" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Step4&lt;/b&gt;: - Now let’s see that how you can achieve &lt;b&gt;Web.Config level Tracing.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;You can enable tracing for the entire application by adding tracing settings in&lt;br /&gt;web.config. In below example, &lt;b&gt;pageOutput="false"&lt;/b&gt; and &lt;b&gt;requestLimit="20"&lt;/b&gt;&lt;br /&gt;are used, so trace information is stored for 20 requests, but not displayed on&lt;br /&gt;the page because pageOutput attribute is set to false.&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;&amp;lt;configuration&amp;gt;&lt;br /&gt;&amp;lt;appSettings/&amp;gt;&lt;br /&gt;&amp;lt;connectionStrings/&amp;gt;&lt;br /&gt;&amp;lt;system.web&amp;gt;&lt;br /&gt;&amp;lt;compilation debug="false" /&amp;gt;&lt;br /&gt;&amp;lt;authentication mode="Windows" /&amp;gt;&lt;br /&gt;&amp;lt;trace enabled ="true" pageOutput ="false" requestLimit ="20"&lt;br /&gt;traceMode ="SortByTime " /&amp;gt;&lt;br /&gt;&amp;lt;/system.web&amp;gt;&lt;br /&gt;&amp;lt;/configuration&amp;gt;&lt;/pre&gt;&lt;br /&gt;Now what happened is all of your application pages are now enabled to&lt;b&gt; tracing&lt;/b&gt;.&lt;br /&gt;&lt;p&gt;&lt;b&gt;Step5&lt;/b&gt;: - Now let’s see what Trace.axd means.&lt;br /&gt;&lt;/p&gt;&lt;b&gt;Trace.axd&lt;/b&gt;: - Page output of tracing shows only the data collected for the current page request. However, if you want to collect detailed information for all the requests then we need to use Trace.axd. We can invoke Trace.axd tool for the application using the following URL http://localhost/application-name/trace.axd. Simply replace page name in URL with Trace.axd. That is, in our case. We should use following URL (Address bar) for our application as shown below.&lt;br /&gt;&lt;p&gt;Let’s see a simple demonstration on &lt;b&gt;Trace.axd.&lt;/b&gt;&lt;/p&gt;Just run your application and click on any one of the button and later in the url bar just replace the name like&lt;a href="http://localhost1348/Trace.axd"&gt; http://localhost1348/Trace.axd&lt;/a&gt;  , will see the output like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://2.bp.blogspot.com/-2kAgcePCBsQ/Tl0hgxb_9GI/AAAAAAAADUw/P6cV8g-Q-hs/s400/6.JPG" border="0" height="259" width="628" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Now just click on the last view details and will see the tracing details like below diagram.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-QL6zjGg-M3A/Tl0hgzPMOoI/AAAAAAAADU4/Os1sCaREej4/s400/7.JPG" border="0" height="334" width="628" /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Also view the following video on ASP.NET Web.config transformation: -&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/43F_hpna5WY?hd=1"&gt;&lt;img src="http://2.bp.blogspot.com/-Oma7DUM4HZw/Tl0hhEXuJnI/AAAAAAAADVA/b6U-6TgutfM/s400/8.JPG" border="0" height="393" width="644" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Also see our tutorials on &lt;a target="_blank" href="http://www.questpond.com/"&gt;ASP.NET interview questions&lt;/a&gt;&lt;/p&gt;Regards,&lt;br /&gt;&lt;p&gt;View more author’s blog on &lt;a target="_blank" href="http://dotnetinter.livejournal.com/39058.html"&gt;ASP.NET interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-4492078138661528368?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/4492078138661528368/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=4492078138661528368' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4492078138661528368'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/4492078138661528368'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/08/aspnet-interview-questions-how-to-do.html' title='ASP.NET interview questions: - How to do Tracing in ASP.NET?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-_qP92tZCfJ8/Tl0hK1UlrqI/AAAAAAAADUI/n8XSGroSdc0/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-7698486173025015817</id><published>2011-08-29T05:57:00.000-07:00</published><updated>2011-08-29T06:29:12.878-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Server interview questions: - What is ACID fundamental? What are transactions in SQL SERVER?</title><content type='html'>A transaction is a sequence of operations performed as a single logical unit of work. A logical unit of work must exhibit four properties, called the ACID (Atomicity, Consistency, Isolation, and Durability) properties, to qualify as a transaction:&lt;br /&gt;&lt;p&gt;Atomicity&lt;br /&gt;&lt;br /&gt;• A transaction must be an atomic unit of work; either all of its data modifications are performed or none of them is performed.&lt;br /&gt;&lt;br /&gt;Consistency&lt;br /&gt;&lt;br /&gt;• When completed, a transaction must leave all data in a consistent state. In a&lt;br /&gt;relational database, all rules must be applied to the transaction's&lt;br /&gt;modifications to maintain all data integrity.&lt;br /&gt;&lt;br /&gt;Isolation&lt;br /&gt;&lt;br /&gt;• Modifications made by concurrent transactions must be isolated from the&lt;br /&gt;modifications made by any other concurrent transactions. A transaction either&lt;br /&gt;see data in the state it was before another concurrent transaction modified it,&lt;br /&gt;or it sees the data after the second transaction has completed, but it does not&lt;br /&gt;see an intermediate state. This is referred to as serializability because it&lt;br /&gt;results in the ability to reload the starting data and replay a series of&lt;br /&gt;transactions to end up with the data in the same state it was in after the&lt;br /&gt;original transactions were performed.&lt;br /&gt;&lt;br /&gt;Durability&lt;br /&gt;&lt;br /&gt;• After a transaction has completed, its effects are permanently in place in the&lt;br /&gt;system. The modifications persist even in the event of a system failure.&lt;/p&gt;View the video on optimistic locking as follows: -&lt;br /&gt;&lt;p&gt;&lt;a target="_blank" href="http://youtu.be/BzJ77ZypU8s?hd=1"&gt;&lt;br /&gt;&lt;img src="http://1.bp.blogspot.com/-WvzjfjK6HEg/TluNIkmFeuI/AAAAAAAADUA/Yregcka5FfA/s400/1.JPG" border="0" height="394" width="645" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Get our more tutorials on &lt;a target="_blank" href="http://www.questpond.com/"&gt;SQL server interview questions&lt;/a&gt;&lt;/p&gt;Regards,&lt;br /&gt;&lt;p&gt;View author’s blog on &lt;a target="_blank" href="http://questpond.blog.com/2011/08/29/sql-server-interview-questions-tell-us-about-acid-fundamental-what-are-transactions-in-sql-server/"&gt; SQL server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-7698486173025015817?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/7698486173025015817/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=7698486173025015817' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/7698486173025015817'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/7698486173025015817'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/08/sql-server-interview-questions-what-is.html' title='SQL Server interview questions: - What is ACID fundamental? What are transactions in SQL SERVER?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://1.bp.blogspot.com/-WvzjfjK6HEg/TluNIkmFeuI/AAAAAAAADUA/Yregcka5FfA/s72-c/1.JPG' height='72' width='72'/><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-8817348825041283772</id><published>2011-08-27T06:12:00.000-07:00</published><updated>2011-08-27T06:41:10.535-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='SQL Server Interview Questions'/><category scheme='http://www.blogger.com/atom/ns#' term='SQL'/><title type='text'>SQL Server interview questions: - What are the different types of replication supported by SQL SERVER?</title><content type='html'>&lt;p&gt;There are three types of replication supported by SQL SERVER:-&lt;br /&gt;&lt;br /&gt;&lt;b&gt;(a) Snapshot Replication&lt;/b&gt;.&lt;br /&gt;&lt;br /&gt;Snapshot Replication takes snapshot of one database and moves it to the other&lt;br /&gt;database. After initial load data can be refreshed periodically. The only&lt;br /&gt;disadvantage of this type of replication is that all data has to be copied each&lt;br /&gt;time the table is refreshed.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;(b)Transactional Replication&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;In transactional replication, data is copied first time as in snapshot&lt;br /&gt;replication, but later only the transactions are synchronized rather than&lt;br /&gt;replicating the whole database. You can either specify to run continuously or on&lt;br /&gt;periodic basis.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;(c)Merge Replication.&lt;br /&gt;&lt;br /&gt;&lt;/b&gt;Merge replication combines data from multiple sources into a single central&lt;br /&gt;database. Again as usual, the initial load is like snapshot but later it allows&lt;br /&gt;change of data both on subscriber and publisher, later when they come on-line it&lt;br /&gt;detects and combines them and updates accordingly.&lt;br /&gt;&lt;br /&gt;Also view video on the difference between Unique key and primary key: -&lt;br /&gt;&lt;br /&gt;&lt;a target="_blank" href="http://youtu.be/8iIvyNPwruU?hd=1"&gt;&lt;br /&gt;&lt;img src="http://2.bp.blogspot.com/-asqseS_QgQQ/TljwMf6iMxI/AAAAAAAADTw/X9UlK3I69N0/s400/1.JPG" border="0" height="392" width="643" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;Get our more tutorials on &lt;a target="_blank" href="http://www.questpond.com/"&gt;SQL server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Regards,&lt;br /&gt;&lt;br /&gt;View author’s blog on &lt;a target="_blank" href="http://www.dotnetinterviewquestions.in/article_sql-server-interview-questions:-types-of-replication-supported-by-sql-server_21.html"&gt;SQL server interview questions&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/5571184103023259871-8817348825041283772?l=computerauthor.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://computerauthor.blogspot.com/feeds/8817348825041283772/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=5571184103023259871&amp;postID=8817348825041283772' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8817348825041283772'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/5571184103023259871/posts/default/8817348825041283772'/><link rel='alternate' type='text/html' href='http://computerauthor.blogspot.com/2011/08/sql-server-interview-questions-what-are.html' title='SQL Server interview questions: - What are the different types of replication supported by SQL SERVER?'/><author><name>Shivprasad Koirala</name><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='27' src='http://1.bp.blogspot.com/-JU4Q1MHnpKs/TbhYJhHcxoI/AAAAAAAACaE/9LbhDS2CRng/s220/Shiv.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://2.bp.blogspot.com/-asqseS_QgQQ/TljwMf6iMxI/AAAAAAAADTw/X9UlK3I69N0/s72-c/1.JPG' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-5571184103023259871.post-8421746517824162557</id><published>2011-08-25T07:12:00.000-07:00</published><updated>2011-08-25T07:39:13.499-07:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='Innerclass'/><category scheme='http://www.blogger.com/atom/ns#' term='c# interview questions'/><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='c#'/><category scheme='http://www.blogger.com/atom/ns#' term='.Net Interview Question'/><title type='text'>C# and .Net Interview Question:- What are InnerClass and how to use them?</title><content type='html'>&lt;p&gt;&lt;b&gt;InnerClass&lt;/b&gt;: - A class which is declared inside the body of another class is called as &lt;b&gt;InnerClass.&lt;/b&gt;&lt;br /&gt;&lt;br /&gt;Syntax: -&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class Outer&lt;br /&gt;{&lt;br /&gt;//having it's own implementation.&lt;br /&gt;class inner&lt;br /&gt;{&lt;br /&gt;//having its own implementation&lt;br /&gt;}&lt;br /&gt;}&lt;/pre&gt;&lt;b&gt;Note&lt;/b&gt;:-&lt;br /&gt;&lt;p&gt;1. An inner class can access the static members of the containing outer class&lt;br /&gt;without using that class name.&lt;br /&gt;&lt;br /&gt;2. Another difference is when the inner class accesses an instance of the outer&lt;br /&gt;class; it can access that object's private members even if they are not static.&lt;br /&gt;&lt;br /&gt;There are many reasons to use InnerClass but the two important reasons are as&lt;br /&gt;follows.&lt;br /&gt;&lt;br /&gt;1. Organizing code into real world situations where there is a special&lt;br /&gt;relationship between two objects.&lt;br /&gt;&lt;br /&gt;2. Hiding a class within another class so that you do not want the inner class&lt;br /&gt;to be used from outside of the class it is created within.&lt;br /&gt;&lt;br /&gt;Let’s see small demonstration on how exactly InnerClass is declared or created.&lt;/p&gt;Step1: - Create a new Project for that Go To &amp;gt; File &amp;gt; New &amp;gt; Project &amp;gt; Windows &amp;gt; Console Application.&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;img src="http://3.bp.blogspot.com/-nqRnt-3WF10/TlZYkbwpzWI/AAAAAAAADTA/Q3QhcKQxNHY/s400/1.JPG" border="0" height="140" width="628" /&gt;&lt;/p&gt;&lt;img src="http://3.bp.blogspot.com/-ACQSTddrWjs/TlZYkqYgtkI/AAAAAAAADTI/b0e4bTcKoCY/s400/2.JPG" border="0" height="41" width="523" /&gt;&lt;br /&gt;&lt;p&gt;&lt;br /&gt;&lt;br /&gt;Step2: - Create an inner class like below code snippet.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;class MyClass&lt;br /&gt;{&lt;br /&gt;public void Method1()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("I am the MainClass");&lt;br /&gt;}&lt;br /&gt;class InnerClass1&lt;br /&gt;{&lt;br /&gt;public void Method1()&lt;br /&gt;{&lt;br /&gt;Console.WriteLine("I am the InnerClass");&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;/pre&gt;The class InnerClass1 here is enclosed inside the declaration of class MyClass. InnerClass1 is thus a nested class. Because it has a public accessibility modifier, it can be accessed in places other than MyClass’s scope.&lt;br /&gt;&lt;p&gt;Step3: - let’s see how we access the above two classes in the main class.&lt;br /&gt;&lt;/p&gt;&lt;br /&gt;&lt;pre&gt;static void Main(string[] args)&lt;br /&gt;{&lt;br /&gt;MyClass obj = new MyClass();&lt;br /&gt;obj.Method1();&lt;br /&gt;MyClass.InnerClass1 obj1 = new MyClass.InnerClass1();&lt;br /&gt;obj1.Method1();&lt;br /&gt;Console.ReadLine();&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;In the above code snippet you can see that in order to use the inner class I have created the instance like below code snippet.&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;MyClass.InnerClass1 obj1 = new MyClass.InnerClass1();&lt;/pre&gt;&lt;br /&gt;&lt;p&gt;&lt;img src="http://3.bp.blogspot.com/-LLyhzPsoJcM/TlZYkrMYrxI/AAAAAAAADTQ/hsK2b1NWww0/s400/3.JPG" border="0" height="105" width="237" /&gt;&lt;/p&gt;&lt;br /&gt;&lt;p&gt;Now when you run your application you will see result like below diagram.&lt;/p&gt;&lt;img src="http://2.bp.blogspot.com/-MZL_v3MLoaM/TlZYk3Jml-I/AAAAAAAADTY/ugEPv_9-hno/s400/4.JPG" border="0" height="47" width="468" /&gt;&lt;br /&gt;&lt;div id="subans4338" class="GoodTextColor" style=""&gt;&lt;br /&gt;	&lt;br /&gt;	Also have a look on this video, which is asked in most of the interviews.&lt;br /&gt;&lt;p&gt;	&lt;a target="_blank" href="http://www.youtube.com/embed/7bKhAJpY9ho?hd=1"&gt;&lt;br /&gt;	&lt;img src="http://3.bp.blogspot.com/-uXrJ3b0Sf7U/TlZYk12LmUI/AAAAAAAADTg/QScsBXDna2k/s400/5.JPG" border="0" height="290" width="474" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;/div&gt;&lt;br /&gt;&lt;p&gt;Please click here to see more &lt;a href="http://www.questpond.com/"&gt;C#/.NET interview questions&lt;/a&gt;&lt;/p&gt;&lt;br /&gt;Regards,&lt;div id="subans4296" class="GoodTextColor"&gt;&lt;br /&gt;	Visit Authors blog for more &lt;a target="_blank" href="http://questpond.over-blog.com/article-c-and-net-interview-question-give-a-brief-on-innerclass-and-procedure-to-use-them-82455489.html"&gt;C# and .NET interview questions&lt;/a&gt;&lt;/div&gt;&lt;br /&gt;&lt;br /&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://b
