Showing posts with label code. Show all posts
Showing posts with label code. Show all posts

Monday, December 31, 2018

ASP.NET MVC Interview Questions -- Part 3

ASP.NET MVC Interview Questions -- Part 3

  1. What are Validation Annotations?
  2. What is Data Annotation Validator Attributes in MVC?
  3. What is Validation Summary in MVC?
  4. What is the use of remote validation in MVC?
  5. Server Side Validation in MVC?
  6. How to make sure Client Validation is enabled in ASP.Net MVC?
  7. How to use Jquery Plugins in ASP.Net MVC validation?
  8. In Server how to check whether model has error or not in ASP.Net MVC?
  9. How can we create Custom Error Page in MVC?
  10. What is GET and POST Actions Types?
  11. How can we determine action invoked from HTTP GET or HTTP POST?
  12. Explain Test Driven Development (TDD) ?
  13. Why to use Html.Partial in MVC?
  14. What is Html.RenderPartial?
  15. What is RouteConfig.cs in MVC?
  16. What are Scaffold templates in MVC?
  17. Explain the concept of MVC Scaffolding?
  18. Explain the types of Scaffoldings.
  19. Can a view be shared across multiple controllers? If Yes, How we can do that?
  20. What are the components required to create a route in MVC?
  21. Why to use “{resource}.axd/{*pathInfo}” in routing in MVC?
  22. What are the two instances where routing is not implemented or required?
  23. What is Route Constraints in MVC?
  24. Can we add constraints to the route? If yes, explain how we can do it?
  25. What are the two ways to add constraints to a route?
  26. What are the possible Razor view extensions?
  27. What are the Main Razor Syntax Rules?
  28. What is PartialView in MVC?
  29. How do you create a partial view and consume it?
  30. What is the difference between View and Partial View?
  31. How we can add CSS in MVC?
  32. What is the use .Glimpse in MVC?
  33. What are the differences between Partial View and Display Template and Edit Templates in ASP.Net MVC?
  34. Explain the need of display mode in MVC.
  35. What is Representational State Transfer (REST) mean?
  36. Explain the tools used for unit testing in ASP.Net MVC?
  37. What are the different Approach in MVC using Entity Framework?
  38. What is Database First Approach in MVC using Entity Framework?
  39. What are the Folders in MVC application solutions?
  40. What are the methods of handling an Error in MVC?
  41. How can maintain session in MVC?
                 Click Here for Part 1            Click Here for Part 2

ASP.NET MVC Interview Questions -- Part 2

ASP.NET MVC Interview Questions -- Part 2

  1. Explain Bundle.Config in MVC.
  2. What is Route in MVC?
  3. Where is the route mapping code written?
  4. What is Default Route in MVC?
  5. How route table has been created in ASP.NET MVC?
  6. Which are the important namespaces used in MVC?
  7. In which assembly is the MVC framework is defined?
  8. What is ViewData?
  9. What is the difference between ViewBag and ViewData in MVC?
  10. What is the difference between Temp data, View, and View Bag?
  11. How can we pass the data From Controller To View In MVC?
  12. Explain using hyperlink how you can navigate from one view to other view?
  13. Explain TempData in MVC?
  14. What is Area in ASP.Net MVC?
  15. How we can register the Area in ASP.Net MVC?
  16. What are HTML Helpers in MVC?
  17. What is the difference between “HTML.TextBox” and “HTML.TextBoxFor”?
  18. What are AJAX Helpers in MVC?
  19. What are the Exception filters in MVC?
  20. How we can handle the exception at controller level in ASP.Net MVC?
  21. How can we do exception handling in MVC?
  22. What are the options can be configured in AJAX helpers?
  23. What is Layout in MVC?
  24. Explain Sections is MVC?
  25. Explain RenderSection in MVC?
  26. Explain RenderBody and RenderPage in MVC?
  27. What is ViewStart Page in MVC?
  28. Explain the methods used to render the views in MVC?
  29. What are the sub types of ActionResult?
  30. What is the difference between "ActionResult" and "ViewResult" ?
  31. What are Non Action methods in MVC?
  32. How to change the action name in MVC?
  33. Explain Peek method in Tempdata in ASP.Net MVC?
  34. Explain Keep method in Tempdata in ASP.Net MVC?
  35. How do you implement Forms authentication in MVC?
  36. What are Code Blocks in Views?
  37. What is Output Caching in MVC?
  38. What are the locations for Output Caching?
  39. How we can multiple submit buttons in ASP.Net MVC?
  40. What is the “HelperPage.IsAjax” Property?
  41. How we can call a JavaScript function on the change of a Dropdown List in MVC?
                 Click Here for Part 1            Click Here for Part 3

ASP.NET MVC Interview Questions -- Part 1

ASP.NET MVC Interview Questions -- Part 1

The ASP.NET MVC is a web application framework developed by Microsoft, which implements the model–view–controller (MVC) pattern.

Based on ASP.NET, ASP.NET MVC allows software developers to build a web application as a composition of three roles: Model, View and Controller. The MVC model defines web applications with 3 logic layers:

  • Model (business layer)
  • View (display layer)
  • Controller (input control)

  1. What is ASP.NET MVC?
  2. Explain Model, Controller and View in MVC?
  3. Define Controller in MVC?
  4. Explain Model in MVC?
  5. Explain View in MVC?
  6. Explain the page life cycle of MVC?
  7. Explain MVC application life cycle?
  8. Explain what are the steps for the execution of an MVC project?
  9. What are the advantages of MVC?
  10. What is Separation of Concerns in ASP.NET MVC?
  11. What is Razor View Engine?
  12. What is the meaning of Unobtrusive JavaScript?
  13. What is the use of ViewModel in MVC?
  14. Mention the advantages and disadvantages of MVC model?
  15. What you mean by Routing in MVC?
  16. What are the three segments for routing important?
  17. What are Actions in MVC?
  18. What is the importance of NonActionAttribute?
  19. How we can invoke child actions in ASP.Net MVC?
  20. What are Filters in MVC?
  21. Explain the role of "ActionFilters" in MVC?
  22. Mention some action filters which are used regularly in ASP.Net MVC?
  23. List out different return types of a controller action method?
  24. What are Action Filters in MVC?
  25. What "beforFilter()","beforeRender" and "afterFilter" functions do in Controller?
  26. What is the need of Action Filters in ASP.Net MVC?
  27. Explain the role of components Presentation, Abstraction and Control in MVC?
  28. What is Attribute Routing in MVC?
  29. How to enable Attribute Routing?
  30. Explain JSON Binding?
  31. What are Model Binders in ASP.Net MVC?
  32. Can I set the unlimited length for "maxJsonLength" property in config?
  33. What are child actions in ASP.Net MVC?
  34. What is JsonResultType in MVC?
  35. How to return the JSON from action method in ASP.Net MVC?
  36. How can I return string result from Action in ASP.Net MVC?
  37. Explain Dependency Resolution?
  38. What is Dependency Injection in ASP.Net MVC?
  39. Explain the advantages of Dependency Injection (DI) in ASP.Net MVC?
  40. Can I use Razor code in Javascript in ASP.Net MVC?
  41. What is Bundling and Minification in MVC?
                 Click Here for Part 2            Click Here for Part 3

Friday, December 14, 2018

C# Interview Questions -- Part 3

C# Interview Questions -- Part 3

71. Explain Get and Set Accessor properties?
72. What is a Thread? What is Multithreading?
73. Name some properties of Thread Class.
74. What are the different states of a Thread?
75. What are Async and Await?
76. What is a Deadlock?
77. Explain Lock, Monitors, and Mutex Object in Threading.
78. What is a Race Condition?
79. What is Thread Pooling?
80. What is Serialization?
81. What are the types of Serialization?
82. What is an XSD file?
83. What are the different types of constructors in C#?
84. Is overriding of a function possible in the same class?
85. What is a collection?
86. What is the lock statement in C#?
87. What are the difference between IEnumerable and IQueryable.
88. What is the difference between early binding and late binding in C#?
89. Which are the access modifiers available in C#?
90. What is Hashtable?
91. What is Garbage Collection?
92. Explain sealed class.
93. Give an example of using sealed class in C#.
94. What are the two different types of errors in C#.
95. Do we get error while executing “finally” block in C#.
96. Mention the assembly name where System namespace lies in C#.
97. What are value types in C#?
98. What are reference types in C#?
99. Explain access modifier “protected internal” in C#.
100. What you mean by inner exception in C#.
101. Can we use delegates for asynchronous method calls in C#?
102. Why to use “Nullable Coalescing Operator” (??) in C#?
103. What is enum in C#?

                Click Here for Part 1            Click Here for Part 2

C# Interview Questions -- Part 2

C# Interview Questions -- Part 2

36. What are delegates?    
37. What is the base class in  net from which all the classes are derived from?   
38. What is the difference between method overriding and method overloading?    
39. What are the different ways a method can be overloaded?    
40. Why can't you specify the accessibility modifier for methods inside the interface?    
41. How can we set class to be inherited, but prevent the method from being over-ridden?    
42. What happens if the inherited interfaces have conflicting method names?    
43. What is the difference between a Struct and a Class?    
44. How to use nullable types in  Net?   
45. How we can create an array with non-default values?    
46. What is difference between is and as operators in c#?    
47. What's a multicast delegate?    
48. What are indexers in C#  NET?   
49. What is difference between the "throw" and "throw ex" in  NET?   
50. What are C# attributes and its significance?    
51. How to retrive attribute information at runtime?    
52. How to implement singleton design pattern in C#?    
53. What is the difference between directcast and ctype?    
54. Is C# code is managed or unmanaged code?
55. What are C# I/O Classes? What are the commonly used I/O Classes?
56. What is a Destructor in C#?
57. What is the difference between Continue and Break Statement?
58. What is the difference between finally and finalize block?
59  What is an Escape Sequence? Name some String escape sequences in C#.
60. What are Regular expressions? Search a string using regular expressions?
61. What are the basic String Operations? Explain.
62. What is Parsing? How to Parse a Date Time String?
63. What are Events?
64. How to use Delegates with Events?
65. What are the different types of Delegates?
66. What do Generic Delegates mean?
67. Explain Publishers and Subscribers in Events.
68. What are Synchronous and Asynchronous operations?
69. What is Reflection in C#?
70. What is a Generic Class?

                 Click Here for Part 1            Click Here for Part 3

C# Interview Questions -- Part 1

C# Interview Questions -- Part 1

C# is a general-purpose, multi-paradigm programming language encompassing strong typing, imperative, declarative, functional, generic, object-oriented (class-based), and component-oriented programming disciplines. It was developed around 2000 by Microsoft within its .NET initiative and later approved as a standard by Ecma (ECMA-334) and ISO (ISO/IEC 23270:2006). C# is one of the programming languages designed for the Common Language Infrastructure.
C#'s development team is led by Mads Torgersen

1. What is C#?    
2. What are the fundamental OOP concepts?Explain    
3. Explain Code compilation in C#    
4. What are the types of comment in C#?    
5. Can multiple catch blocks be executed?    
6. Explain Namespaces in C#    
7. What is the difference between public, static and void?    
8. What is an object?    
9. Define Constructors?    
10. What is Jagged Arrays?    
11. What is the difference between ref & out parameters?    
12. What is the use of using statement in C#?    
13. What is serialization?    
14. Can "this" be used within a static method?    
15. What is difference between constants/"const" and read-only?    
16. What is an interface?    
17. What are the different types of classes in C#?    
18. What are value types and reference types?    
19. What are Custom Control and User Control?    
20. What are sealed classes in C#?    
21. What is method overloading?    
22. What is the difference between Array and Arraylist?    
23. Can a private virtual method be overridden?    
24. What are the different accessibility modifiers in c#?    
25. What are the differences between System String and System Text StringBuilder classes? 
26. What's the difference between the System Array CopyTo() and System Array Clone() ?
27. How can we sort the elements of the array in descending order?    
28. What's the difference between an interface and abstract class?    
29. What is the difference between Virtual method and Abstract method?    
30. What is the difference between Finalize() and Dispose() methods?    
31. What are circular references?    
32. What are generics in C# NET?   
33. What is an object pool in  NET?   
34. What are the commonly used types of exceptions in  Net?   
35. How is Exception Handling implemented in C#?

                 Click Here for Part 2            Click Here for Part 3