Social Icons

twitterfacebookgoogle pluslinkedinrss feedemail
Showing posts with label Interview Questions. Show all posts
Showing posts with label Interview Questions. Show all posts

Sunday, January 27, 2013

Interview Question: What is Duck Typing?

"Duck Typing" is not a common interview question but one of the interviewer in a panel may ask you this just to check your knowledge out of the common questionnaire. You might be already answered this in a different question but stucked here.

So, what is this "Duck Typing" and how this benefits a C# developer? Ok, let's start discussing this in today's blog post and I assume, you will find it interesting.

✔ Read More...

I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to
C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials, Interview Questions, Duck Typing

Friday, October 12, 2012

Extension Methods in C#

Extension Methods in C#

Extension Methods in C#   Introduction Today, in this article let's play around with one of the interesting and most useful concept in C#.   Question: What are extension methods? In simple terms "Extension methods are a special kind of static method, but they are called as if they were instance methods on the extended type." [...]

Read more of this post

I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to
C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials, Extension Methods In C#, Interview Questions

Wednesday, September 26, 2012

What is the difference between Finalize() and Dispose()

Some quick points on Finalize() and Dispose() in C#:

1. Finalize() is the C# equivalent of destructor ~Object() syntax in C#. In VB.Net you implement the Finalize() by overriding it. But, in C# the compiler translates the destructor to a Finalize() method.

2. Finalize() can NOT be overridden or called in C#.

3. Since, Finalize() is called by the Garbage Collector, it is non-deterministic.

4. Dispose() has to be implemented in classes implementing IDispose interface.

5. Its the right place for freeing-up unmanaged resources like file, handles, and connections etc.

6. Dispose() method is called explicitely in the code itself.

7. Dispose() method is automatically called (for objects which implement IDispose), when used in a "using" statement.

Difference between Finalize and Dispose Method in .net :

C# Provides two special methods that are used to release the instance of a class from memory, Finalize() and Dispose().

Finalize(): The Finalize destructor is a special method that is called from the class to which it belongs or from the derived class. The Finalize() destructor is called after the last reference to an object is released from the memory. The .Net Framework automatically runs the Finalize() destructor to destroy objects in the memory. However, it is important to remember that the Finalize() destructor may not execute immediately when an object loses scope. It is called by CLR using reference-tracing garbage collection, the CLR periodically check for objects that are not used by the application. When such an object is found, the Finalize() destructor is called automatically and the garbage collector of the CLR release the object from the memory.

Dispose(): The Dispose() method is called to release a resource, such as database connection, as soon as the object using such a resource is no longer in use. Unlike the Finalize() destructor, the Dispose() method is not called automatically and you must explicitly call it from a client application when an object is no longer needed. The IDisposable interface contains the Dispose() method. Therefore , to call the Dispose() method, the class must implement the IDisposable interface.

I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to
C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tutorials, Dispose, Finalize, Garbage Collector, Interview Questions

Tuesday, September 4, 2012

CSharp Interview Question: What is Action in C Sharp

Action is type of delegate
  • It returns no value.
  • It may take 0 parameter to 16 parameters.
For example below Action can encapsulates a method taking two integer input parameter and returning void.

Read More...

I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tips and Tricks,Computer Tutorials,Dot Net Interview Questions,Interview Questions

Sunday, September 2, 2012

Types of Constructor in .Net

Constructor is nothing but a function (with the same name as Class) and is used for initializing the members of a class whenever an class object is created. You can initialize the members with any value (as per member datatype) or with the default values through constructor.

If a class is not defined with the constructor then the CLR (Common Language Runtime) will provide an implicit constructor which is called as Default Constructor.
A class can have any number of constructors provided they vary with the number of arguments that are passed, which is they should have different signatures.

Some of the basic properties of Constructor are :
a. Constructors do not return a value.
b. Constructors can be overloaded.
c. If a class is defined with static and Non-static constructors then the privilege will be given to the Non-static constructors.

Read More...


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,VS2010,.Net,Articles,Computer Tips and Tricks,Computer Tutorials,Dot Net Interview Questions,Interview Questions

Wednesday, August 29, 2012

Basis Topics of interview questions for Beginner or 1 Year experience in .Net

For 1 year you have to prepare all basics of .net (c# or vb,sql server,asp.net).

Mainly OOPs concepts. 
a.Abstraction
b.Encapsulation
c.Polymorphism
b.Inheritance
d.Interface
e.Abstraction Vs Interface
f.Abstract Classes
g.Static Classes

Framework basics
a.What is .net framework
b.framework 2.0 vs 3.0 vs 3.5
c.What is CLR & explain
d.What is CTS
f.What is CLS
g.How Garbage Collector Works
h.What is JIT & types of JIT?

ADO.net
a.Dataset
b.Datareader
c.DataAdapter
d.Dataset vs DataReader
e.Dataset Vs DataAdapter

C#
a.Assembly and types
b.Partial classes
c.What is webservices
d.Serialization
e.Single ton
f.Single call

Sql Server
a.Constrains
b.primary key Vs unique key
c.Aggregate Functions
d.Stored Procedure
e.Functions
f.Stored Procedure Vs Functions
G.Vies
h.Triggers
i.Joins & types of Jions
j.Having Vs Where

and many more all are basics only.

I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,Computer Tips and Tricks,Computer Tutorials,Dot Net Interview Questions,Interview Questions,

Monday, August 27, 2012

A Beginner's Tutorial on String Comparison in C#

Usually in our applications when we want to compare two strings we use the equality operator. Under most scenarios this will work properly but still we should know what are the other ways we can do string comparisons and perhaps achieve better performance and results. So lets say I have a variable str and I want to check whether its value is equal to "Yes" or not.

Read More...

I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,Computer Tips and Tricks,Computer Tutorials,Dot Net Interview Questions,Interview Questions,Programming Tutorials,Sample Code,String,Beginner

Func and Action Delegates

The .Net Framework 3.5 has introduced two sets of System-Defined Delegates named Func andAction. Action<> and Func<> are extremely useful tools for reducing duplication in code and decreasing coupling. The Func Delegate encapsulates a method that accepts between zero and four arguments and returns a value. The Action Delegate encapsulates a method that accepts between zero to four parameters and does not return a value i.e. Action delegates differ from Func in that the method must returns void.

Read More...


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

C#,.NET,Architect,Intermediate,Advanced,VS2010,.Net,Articles,Computer Tips and Tricks,Computer Tutorials,Dot Net Interview Questions,Interview Questions,Visual Studio,.Net Framework 3.5,Delegates

Saturday, July 21, 2012

Metro Applications - FAQ

With the advent of Microsoft Windows 8, Windows Phone 8 and Office 2013, Microsoft is now all about Metro UI and Metro Apps. And when Windows 8 will be released, everybody will be developing or talking about Metro apps. But what is a Metro app and how to build these apps? There are many questions in the mind of many developers. Let's just find answers for few of them in this blog post.

Read More from: Original Source


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

Computer Tips and Tricks,Computer Tutorials,Dot Net Interview Questions, FAQ,Interview Questions,Metro Style Applications,Microsoft

Tuesday, July 17, 2012

Return Multiple Values(or Objects) in VB.NET

You might have searched "How to return multiple objects in VB.Net" in google and you might have got a lot of Ir-relevant articles. But this is not such an article, this goes to the point. I am going to teach you how to return multiple values in VB.net.

I gave a lot of try (Searching), how to do the stuff but most of the search results turned out to be like using a single object and returning multiple values in it, but that I do not need. So I thought of writing an article here about the same. So at least it will be helpful for sum beginners.


I guess you came to this post by searching similar kind of issues in any of the search engine and hope that this resolved your problem. If you find this tips useful, just drop a line below and share the link to others and who knows they might find it useful too.

Stay tuned to my blogtwitter or facebook to read more articles, tutorials, news, tips & tricks on various technology fields. Also Subscribe to our Newsletter with your Email ID to keep you updated on latest posts. We will send newsletter to your registered email address. We will not share your email address to anybody as we respect privacy.


This article is related to

.NET,Intermediate,VS2010,Articles,Computer Tips and Tricks,Computer Tutorials,Dot Net Interview Questions,Interview Questions,Microsoft,Sample Code,Visual Basic,Visual Studio

Saturday, April 9, 2011

New Interview Questions for Senior Software Engineers

New Interview Questions for Senior Software Engineers
  • What is something substantive that you've done to improve as a developer in your career?
  • Would you call yourself a craftsman (craftsperson) and what does that word mean to you?
  • Implement a using on .
  • What is SOLID?
  • Why is the Single Responsibility Principle important?
  • What is Inversion of Control? How does that relate to dependency injection?
  • How does a 3 tier application differ from a 2 tier one?
  • Why are interfaces important?
  • What is the Repository pattern? The Factory Pattern? Why are patterns important?
  • What are some examples of anti-patterns?
  • Who are the Gang of Four? Why should you care?
  • How do the MVP, MVC, and MVVM patterns relate? When are they appropriate?
  • Explain the concept of Separation of Concerns and it's pros and cons.
  • Name three primary attributes of object-oriented design. Describe what they mean and why they're important.
  • Describe a pattern that is NOT the Factory Pattern? How is it used and when?
  • You have just been put in charge of a legacy code project with maintainability problems. What kind of things would you look to improve to get the project on a stable footing?
  • Show me a portfolio of all the applications you worked on, and tell me how you contributed to design them.
  • What are some alternate ways to store data other than a relational database? Why would you do that, and what are the trade-offs?
  • Explain the concept of convention over configuration, and talk about an example of convention over configuration you have seen in the wild.
  • Explain the differences between stateless and stateful systems, and impacts of state on parallelism.
  • Discuss the differences between Mocks and Stubs/Fakes and where you might use them (answers aren't that important here, just the discussion that would ensue).
  • Discuss the concept of YAGNI and explain something you did recently that adhered to this practice.
  • Explain what is meant by a sandbox, why you would use one, and identify examples of sandboxes in the wild.
  • Concurrency
    • What's the difference between Locking and Lockless (Optimistic and Pessimistic) concurrency models?
    • What kinds of problems can you hit with locking model? And a lockless model?
    • What trade offs do you have for resource contention?
    • How might a task-based model differ from a threaded model?
    • What's the difference between asynchrony and concurrency?
  • Are you still writing code? Do you love it?
  • You've just been assigned to a project in a new technology how would you get started?
  • How does the addition of Service Orientation change systems? When is it appropriate to use?
  • What do you do to stay abreast of the latest technologies and tools?
  • What is the difference between "set" logic, and "procedural" logic. When would you use each one and why?
  • What Source Control systems have you worked with?
  • What is Continuous Integration?  Have you used it and why is it important?
  • Describe a software development life cycle that you've managed.
  • How do you react to people criticizing your code/documents?
  • Whose blogs or podcasts do you follow? Do you blog or podcast?
  • Tell me about some of your hobby projects that you've written in your off time.
  • What is the last programming book you read?
  • Describe, in as much detail as you think is relevant, as deeply as you can, what happens when I type "cnn.com" into a browser and press "Go".
  • Describe the structure and contents of a design document, or a set of design documents, for a multi-tiered web application.
  • What's so great about ?
  • How can you stop your DBA from making off with a list of your users’ passwords?
  • What do you do when you get stuck with a problem you can't solve?
  • If your database was under a lot of strain, what are the first few things you might consider to speed it up?
  • What is SQL injection?
  • What's the difference between unit test and integration test?
  • Tell me about 3 times you failed.
  • What is Refactoring ? Have you used it and it is important? Name three common refactorings.
  • You have two computers, and you want to get data from one to the other. How could you do it?
  • Left to your own devices, what would you create?
  • Given Time, Cost, Client satisfaction and Best Practices, how will you prioritize them for a project you are working on? Explain why.
  • What's the difference between a web server, web farm and web garden? How would your web application need to change for each?
  • What value do daily builds, automated testing, and peer reviews add to a project? What disadvantages are there?
  • What elements of OO design are most prone to abuse? How would you mitigate that?
  • When do you know your code is ready for production?
  • What's YAGNI? Is this list of questions an example?
  • Describe to me some bad code you've read or inherited lately.
Your thoughts? I'll add good questions from the comments throughout the day.

Tuesday, February 8, 2011

.NET Interview FAQs - 1


What are the different terms that are related to the life cycle of a Remoting object?

The related terms to the life cycle of a Remoting object are define as Lease Time, Sponsorship Time, RenewOnCallTime, and LeaseManagePollTime.

Lease Time: The LeaseTime property protects the object from the garbage collector. Every object created has a default leasetime for which it will be activated. Once the leasetime expires, the object is eligible again for garbage collector and is eventually destroyed. Default value is 5 minutes.
Sponsorship Time: Even though the leasetime of an object has expired, there still may be clients who would still need the remoting object on the server. In such cases the leasemanager keeps a track of such clients and asks them if they need the object and are ready to sponsor the object to extend its existence. This is done through SponsorshipTime property.
RenewOnCallTime: The RenewOnCallTime property defines the duration for which a remoting object's lease is extended if a sponsor is found. The default value is 2 minutes.
LeaseManagePollTime: The LeaseManager class has a property PollTime, which defines the frequency at which the LeaseManager polls the leases. Default is 10 seconds.


Explain the two different types of remote object creation mode in .NET?

The two different ways by which object can be created using Remoting is:-

SAO (Server Activated Object): It lasts the lifetime of the server. They are activated as SingleCall/Singleton objects. It makes objects stateless. A SingleCall object gets created for each request by client and A Singleton object is created once on the server and is shared by all the clients.

CAO (Client Activated Objects): CAO creates stateful objects. The object creation request is based on the request by client side. Therefore, the lifetime is based on client and not server. Single instance of object is created for every call.


What is the difference between URI and URL?

URI: (Uniform Resource Identifier)  
 It is a string and its responsibility is to identify a resource by meta-information. It gives information about only one resource. This is nothing but an address of some resource (page of a site) on the Web. URI is a generic term.

The World Wide Web can be considered as a large group of resources or contents placed in different computers all around the world. These contents can be found and can link each other through URIs.

Eg. A sample URI looks like :

•    www.dotnetfunda.com
•    /some/page.html

URL: (Uniform Resource Locator)
It identifies the resource on the net and tells it is obtainable using what protocols. This is a unique identifier which is usually a namespace. Even if it looks like a URL but it doesn’t have to necessarily locate any resource on the web. URL is a type of URI.

It can only identifies where and how to find it. A common URL is composed by four parts:
•    Protocol: Also called URL scheme, this specifies which protocol is used to access the document.
•    Computer name: Gives the name of the computer (usually a domain name or IP address) where the content is hosted.
•    Directories: Sequence of directories separated by slashes that define the path to follow to reach the document.
•    File: The name of the file where the resource is located.

Sample url looks like

•    http:/www.dotnetfunda.com/users/login.aspx
Here, http is the protocol, dotnetfunda.com is the domain name users is the folder name, login.aspx is the filename
•    http://dotnetfunda.com/articles/default.aspx
Here http is the protocol, dotnetfunda.com is the domain name, articles is the folder name and default.aspx is the file name


What is Fragment caching in asp.net?

Fragment caching refers to the caching of individual user controls within a Web Form. Each user control can have independent cache durations and implementations of how the caching behavior is to be applied. It allows to cache specific portions of the page rather than the whole page.

The use of Fragment caching is to cache the subset of a page. The best examples for Fragment caching are navigation bars, headers, and footers etc.

Fragment cache is used to store user controls individually within a web form in cache instead of the whole webform.

control1:
<%@ OutputCache Duration="40" VaryByParam="none"%>

control2:
<%@ OutputCache Duration="60" VaryByParam="none"%>


Here the OutputCache duration is specified in seconds.

If control1 and control2 exist on a single webform together, the data of control1 and control2 would be cached for 40 and 60 seconds respectively based on @OutputCache directive. 


What are Partial classes in .net?

When there is a need to keep the business logic separate from the User Interface or when there is some class which is having multiple numbers of developers implement the methods in it, the class can be separated and written in different files called as partial class.

Below there is a sample class to know how to use partial class in case of C#
Public partial class MyPartialClass1
{
         //code
}
// this code could be in file1

Public partial class MyPartialClass1
{
         //code
}
// this code could be in file2

Partial classes allow us to divide the class definition into multiple files (physically). Logically, all the partial classes are treated as a single file by the compiler.

Differences between Window Services and Window Applications

Window Services:

1) They have no GUI (Graphical User Interface)

2) Used mainly for background processing or monitoring tasks.

3) They are found in the Services section of the Control Panel.

4)Installed using special utilities like InstallUtil.

5)They have startup types like Automatic, Manual


examples:

1) SMTP Service: used for sending emails across network

2)MSSQLServer Service: used for starting/stopping the SQL Server engine.

We can also create our own services and install them using InstallUtil.


Window Applications

1) They are GUI based.

2) Used for creating windows which can be run from their exe's stored a folder/desktop to enable the users to perform these kinds of tasks:

a)Data Entry(Ex: Inventory/Payroll management), Data viewing(view employee details)

b)Viewing hardware/software information of a system.

c) Games/ Graphics.

d)Customized calculators, Notepads, Explorers

3)They are not found in the Services section of Control Panel.

4)No startup types like Automatic/Manual.


We can start/stop Windows Service from a Windows Application .

Is it possible for a control to define a handler for an event, that the control can't itself raise?

Yes, It's is possible for a control to define a handler for an event, that the control can't itself raise.

These incidents are called attached events.

For example, a button controls in a grid. The button class defines a click event, but the grid class doest not. However, you can still define a handler for buttons in the grid by attaching the Click events of the button control.

Differences between method overloading and method overriding

Method Overloading and Method Overriding are both the techniques used to implement FUNCTIONAL POLYMORPHISM
They enhance the methods functionality using their respective features.

overloading:
1) It involves having another method with the same name in a class or its derived class.

2)can be implemented with or without inheritance.

3)It is implemented by:

a)changing the number of parameters in different methods with same name.

b)changing the parameter data types (if the number of parameters are same)

c)changing parameter order.

4)applicable to static as well as non static methods:

5)no keywords needed before the method names in C#.

6)also called as COMPILE TIME Polymorphism.
example: int add(int a, int b)
{
return a+b;
}
int add(int a)
{
return a*5;
}




Overriding:

1) It involves having another method with the same name in a base class and derived class.

2)always needs inheritance.

3)It is implemented by having two methods with same name, same signature, but different implementations (coding)in a base class and derived class

4)applicable to nonstatic, nonprivate methods only.access modifiers of the methods are not changed in the base and derived classes.

5)virtual and override keywords are needed before the method names in base and derived classes.
For overriding in firther classes, override keyword will be used,

6)RUN TIME Polymorphism
example:
class A
{
public virtual void demo()
{

}
}
class B:A
{
public override void demo()
{

}
static void Main()
{
B obj=new B();
obj.demo();
}
}
There was an error in this gadget
 
Get Twitter Fan Box Widget

Like Us On Facebook and Receive All Updates!

You can also receive Free Email Updates:

Powered By Tutorails

Followers