h1.post-title { color:orange; font-family:verdana,Arial; font-weight:bold; padding-bottom:5px; text-shadow:#64665b 0px 1px 1px; font-size:32px; } -->

Pages

Define SOLID

SOLID are five basic principles which help to create good software architecture. SOLID is an acronym where:-


  • S stands for SRP (Single responsibility principle).
  • O stands for OCP (Open closed principle)
  • L stands for LSP (Liskov substitution principle)
  • I stands for ISP ( Interface segregation principle)
  • D stands for DIP ( Dependency inversion principle)

Solve First Chance Exception in .NET

You most likely see these messages in Immediate Window because you have set Redirect all Output Window text to the Immediate Window in Tools - Options... - Debugging - General. That's why when you right-click in Immediate Window, you cannot see any option to disable messages. It's Output Window text and thus you need to set it in the Output Window. So open Output Window, right-click and uncheck Exception Messages from context menu. Simple but it took me one hour to find it.

Define First Chance Exception in .NET

              When an application is being debugged, the debugger gets notified whenever an exception is encountered  At this point, the application is suspended and the debugger decides how to handle the exception. The first pass through this mechanism is called a "first chance" exception.
               In Visual Studio, you may see a message in the output window that looks like this:
              A first chance exception of type 'System.ApplicationException' occurred in myapp.exe
              First chance exception messages most often do not mean there is a problem in the code. For applications / components which handle exceptions gracefully, first chance exception messages let the developer know that an exceptional situation was encountered and was handled.

differences between UNION and JOINS

A join selects columns from 2 or more tables. A union selects rows.

difference between an XML "Fragment" and an XML "Document."

An XML fragment is an XML document with no single top-level root element. To put it simple it is a part
(fragment) of a well-formed xml document. (node) Where as a well-formed xml document must have only
one root element.

anchoring different from docking

Anchoring treats the component as having the absolute size and adjusts its location relative to the parent
form. Docking treats the component location as absolute and disregards the component size. So if a status
bar must always be at the bottom no matter what, use docking. If a button should be on the top right, but
change its position with the form being resized, use anchoring.

create a separator in the Menu Designer

A hyphen '-' would do it. Also, an ampersand '&\' would underline the next letter.

Define Lambda Expression With LINQ

LINQ queries can be written in two syntaxes:

  •  General Query Syntax
  •  Lambda Expression Syntax

Syn for Lambda Expression:
DataSource.Clause(DataAliasName => Expression)

difference between Move and LocationChanged? Resize and SizeChanged?

Both methods do the same, Move and Resize are the names adopted from VB to ease migration to C#.

Define Mandatory Clause in LINQ

1) from clause 2)in clause3) select clause

Define Clause in LINQ

1) from clause 2)in clause 3)let clause 4)where clause 5) orderby clause 6)select clause 7)group by clause

Define Thread life cycle

1.Ready: This is the initial state. The thread object is created.
2.Running: The thread is currently being executed.
3.Sleeping: The thread is temporarily paused. .NET framework offers automatic switching between ―Running and ―Sleeping states, when other threads are executed.
4.Suspended: The thread is temporarily suspended (paused). It will be continued, when you call ―Resume() method.
5. Dead: The thread was closed; it can‘t be restarted or continued.