You are on page 1of 5

Tips on answering: A class can extend only 1 abstract class but can implement multiple

1. Answer in full sentences in English. Not only is this formal but it also gives interfaces.
you more time to think about your answer. 10. What are Delegates? – variables that reference methods with parameter
2. When given a term, define and explain. list and return type; frequently used with event binding and handling;
3. Give an example of when you used it and why. If you haven’t used it, give syntax: public delegate int MethodName(object anObject, string aString)
an example scenario of when you would use it and why. 11. What is LINQ? – Language-Integrated Query; a powerful SQL-like language
that enables querying and updating data for any data store, including in-
C#: memory object collections
1. What are the 4 Pillars of Object-Oriented Programming? Explain each. 12. What is Entity Framework? – an object-relational mapper that allows for
a. Encapsulation – methods return results without exposing actual working with relational data using domain-specific objects/models
implementation to calling class 13. What are Lambda Expressions? – anonymous functions that use the
b. Inheritance – variables, properties and methods are carried over for lambda operator (=>) to write delegates/local functions that can be
use from the base class to the child class passed as arguments and returned as return values
c. Polymorphism – a class can behave like any of its parent classes or 14. What are Generics? – a type variation of classes or methods; specifies its
interfaces, able to run and call their methods subtypes upon declaration
d. (Data) Abstraction – data is organized within an object that contains a. Generic classes – usually used for collection classes; syntax: eg:
properties (and usually with constructors) List<object>, Dictionary<string, object>
2. What is a Class? – basic construct that contains variables, properties, b. Generic methods – usually used for type-flexible methods; syntax: eg:
constructors, methods, etc.; can be nested; can extend up to 1 class; can public void AddToCollection<T>(T anyCollectible)
implement multiple interfaces
3. How do you apply/use inheritance in C#? – by creating a class and ASP.NET/WCF:
extending a base class; used when you want a derived class to be a 1. Explain the ASP.NET Page life cycle.
variation of a base class; syntax: DerivedClassName: BaseClassName a. Stages: Page request, Start, Initialization, Load, Postback event
4. How do you apply/use polymorphism in C#? – by creating a class and handling, Rendering, Unload
extending a base class and/or implementing interfaces; used when you b. Events: PreInit, Init, InitComplete, Preload, Load, Control events,
want a class to behave like its parent classes and its interfaces; syntax: LoadComplete, PreRender, PreRenderComplete, SaveStateComplete,
ClassName: BaseClass, Interface1, Interface2, InterfaceX Render, Unload
5. Explain an override method. – a class method that writes over an inherited 2. List down the different ASP.NET state management, explain each.
method existing in parent classes; overrideable methods are marked with a. Client-side:
keywords abstract, override and virtual i. View State – a dictionary object that retains keys and values
6. Explain method overloading. – creating similarly named functions in the between multiple requests in the same page; stores the page
same class but with different input parameters; used to handle different state as a hashed string in a hidden input in the form; default
implementations for different input parameters method for persisting page state; can be disabled
7. What is a Sealed class? – cannot be inherited or extended; cannot be used ii. Control State – like View State but used for custom controls;
as a base class stores subcontrols’ state into the control; cannot be disabled;
8. What is an Abstract class? – cannot be instantiated; frequently with partial fallback state management for when View State is disabled
or missing implementation; frequently with abstract method definitions iii. Hidden Fields – simple storage for single values; placed in the
or stubs; usually used as base classes form
9. What is the difference between an Abstract class and an Interface? – iv. Cookies – data stored in bits of text files that are stored in the
Interface is not a class; abstract classes are. Interface can only have client’s computer as either physical files or in-memory in the
method definitions; abstract class can have partial implementation client browser session; usually relates to per-user/Session data
(variables, properties, method definitions or fully-implemented methods).
v. Query String – key-value pairs in the form of a string appended b. Bootstrap – a front-end framework integrating HTML, CSS and
to a URL; starts with a question mark (?) and joined by JavaScript that simplifies developing responsive, mobile-first
ampersand (&); syntax: eg: webpages via themes, controls and plugins
?firstKey=valueOfFirstKey&secondKey=valueOfSecondKey c. Knockout.js – a JavaScript library that simplifies building UIs in an
b. Server-side: MVVM (Model-View-ViewModel) pattern; simplifies data-binding and
i. Application State – an instance of HttpApplicationState; a global event handling by encapsulating data and behavior into ViewModels
storage accessible by all pages and by all users; used for data to d. Angular.js – a feature-rich JavaScript library that simplifies building
be persisted across multiple page requests web apps in an MVW (Model-View-Whatever) pattern; mostly used
ii. Session State – an instance of HttpSessionState; like Application as a framework for Single-Page Applications; simplifies routing, data-
State but storage is per-user and scoped to current browser binding, event handling via controllers, server communication via
session; dependent on session: data is lost when session expires services, creating reusable components via directives, and
or a new session is started localization; modular and extensible
iii. Profile Properties – user-specific storage; like Session State but 10. What are Web Services? – programmable application logic; run on
doesn’t depend on the session; by default, stores data in SQL standard web protocols such as Simple Object Access Protocol (SOAP)
tables when using SqlProfileProvider which uses XML for data description and HTTP for transport; output are
3. What is View State in asp.net? – (See ASP.NET/WCF Item 2.a.i.) SOAP messages
4. What is the difference between View State and Session State? –View State 11. What are WCF Services? Explain their major components. – services built
is client-side storage; Session State is server-side storage. View State upon Windows Communication Foundation framework; can send data as
persists data across multiple requests on the same page; Session State asynchronous messages from one service endpoint to another, which can
persists data across multiple page requests. be hosted by Internet Information Systems (IIS) or in an application;
5. Where are the Session variables stored? – depending on the output messages can be as simple as XML or as complex as a stream of
SessionStateProvider; the default SessionStateProvider uses the InProc binary data
mode which stores in server memory; the SessionStateProvider or its Components:
mode can be modified to store in a SQL database or a storage provider a. Service Class – implements the service interface; exposes at least one
6. What are Cookies? – (See ASP.NET/WCF Item 2.a.iv.) method
7. What is HTML5? – HyperText Markup Language 5; successor to HTML4; b. Hosting Environment – a managed process for running the service
markup language for creating the visual, front-end component of web c. Endpoints – used by clients to access functionalities of the service;
pages found through 3 components: address, binding, and contract
Sample tags/elements: 12. Explain about the use of Controller, View and Model components in MVC.
a. new structural tags: section, header, footer, nav, article, aside a. Model – represents database objects
b. new inline tags: mark, time, meter, progress b. View – displays the data in the form of web pages
c. new elements: canvas, video, audio c. Controller – directs the flow of user interaction and user input
8. What is CSS3? – Cascading Style Sheets 3; successor to CSS2.1; language d. MVC – The Controller controls which Model will be updated, if
that describes the presentation of HTML documents; used at front-end necessary, and passed to the View.
for aesthetic purposes; newly supports shadows, transformations, 13. How many web.config files can a website application have? – Typically, just
animations and improves background capabilities one. But there can be one web.config file for each subdirectory in the web
Sample attributes/properties: app that overrides the configuration in the parent directories. Lastly, it’s
a. for elements: background-size, border-radius, box-shadow, transition possible to create transformations of web.config files (eg:
b. for texts: text-overflow, text-shadow, text-stroke web.transform.config) which build on top of the web.config file and can
9. What are jQuery, Bootstrap, Knockout.js and Angular.js? insert, replace, remove configurations.
a. jQuery – a feature-rich JavaScript library/plugin that simplifies 14. What is machine.config? – the universal config file with settings for the
document traversal and manipulation, event handling, animation and entire computer; contains configuration for machine-wide assembly
AJAX; cross-browser compatible and extensible binding, built-in remoting channels, and ASP.NET.
15. Is there any other authentication available in the website besides Windows ii. Right Outer Join – all rows in second-named/right table are
authentication? – Yes, as follows: included; unmatched rows in first-named/left table not included
a. Forms Authentication – form-based, credentials collection (usually an iii. Full Join – all rows in all joined tables are included regardless of
email address or username, and a password); if successful, issues match
cookies to the client c. Cross Join – join whose result set includes one row for each possible
b. Passport – form-based, single logon and core profile services combination of rows from the two tables
provided by Microsoft 2. What is the difference between an inner join and outer join? – Inner join
c. None – allows for no authentication at all or custom authentication displays rows that have a match in both joined tables; Outer join displays
16. If you use authentication, where are the passwords saved? – saved in the rows that have a match in at least one table, and may or may not have
database, usually in the table aspnet_Users, but hashed using a one-way related rows.
encryption (SHA) 3. When do you use functions in SQL server? – when you want to encapsulate
17. What are WCF bindings? – one of three components of endpoints; defines reusable logic in the form of methods that compute and return
how a service can be accessed and communicates with other endpoints; scalar/single values or table values; Scalar/single values can be used inline
must specify transport protocol in SQL statements, while table values can be joined upon, etc.
18. Could you name 2-3 bindings that are used in WCF? – Some common 4. What is the difference between stored procedure and function? – Stored
examples of system-provided bindings are as follows: Procedures can return zero, single or multiple values; Functions are
a. BasicHttpBinding – an HTTP protocol binding suitable for services required to return one value or a set. Stored Procedures can have INSERT,
conforming to WS-I Basic Profile specification UPDATE, DELETE transactions; Functions cannot. Stored Procedures can
b. WSHttpBinding – interoperable binding suitable for WS-* protocols have input and output parameters; Functions only have input parameters.
c. NetNamedPipeBinding – uses the .NET framework to connect to Stored Procedures can call on Functions; Functions cannot call on Stored
other WCF endpoints on the same machine Procedures. Stored Procedures cannot be used in SELECT, WHERE and
d. NetMsmqBinding – uses the .NET framework to create queued HAVING statements; Functions can be used. Stored Procedures can use
message connections with other WCF endpoints try-catch error handling; Functions cannot.
19. What are the different validators? – checks the validity of user input 5. What are cursors and triggers? – Cursors are control structures used to
against a set of rules loop through database rows, similar to the FOR loop. Triggers are special
a. In ASP.NET web pages – validation controls that reference input stored procedures that automatically execute when an INSERT, UPDATE
controls to validate or DELETE event occurs in a table or a view.
eg: RequiredFieldValidator, CompareValidator, RangeValidator, 6. Explain indexing in SQL. – used to quickly find database rows with specific
RegularExpressionValidator, CustomValidator column values by finding relevant rows without having to read table/view
b. In ASP.NET MVC – attributes used to decorate model properties rows sequentially; like indexes in books, it enables finding data quickly
eg: Required, StringLength, Range, RegularExpression, DataType without reading the entire book. An Index in a database is a list of values
in a table/view with the storage locations of rows in the table/view that
SQL: contain each value – similar to how an index in a book is a list of
1. Enumerate the different join statements and explain each. words/phrases with the page numbers that contain each word/phrase.
a. Inner Join – join that displays only the rows that have a match in both 7. What is the difference between a Clustered Index and a Non-clustered
joined tables index? – A Clustered Index sorts and stores data rows in the table/view
b. Outer Join – join that includes rows even if they do not have related based on their key values, which are columns included in the index
rows in the joined table; with three variations: definition. There can be only one clustered index per table/view because
i. Left Outer Join – all rows from first-named/left table are the data rows can only be sorted in only one order. A Non-clustered Index
included; unmatched rows in second-named/right table not has a structure separate from the data rows, contains the non-clustered
included index key values and each key value entry has row locator, which is a
pointer to the data row that contains the key value.
8. What are the different types of indexing in SQL server? iii. Factory Method – creates an instance of several derived classes
a. Hash – data is accessed through in-memory hash table iv. Prototype – a fully initialized instance to be copied or cloned
b. Memory-optimized Non-clustered – memory consumption is a v. Singleton – a class of which only a single instance can exist
function of the row count and the size of the index key columns b. Structural
c. Clustered – sorts and stores data rows of table/view in order based i. Adapter – match interfaces of different classes
on clustered index key ii. Bridge – separates an object’s interface from its implementation
d. Non-clustered – can be defined on a table/view with a clustered iii. Composite – a tree structure of simple and composite objects
index or on a heap iv. Decorator – add responsibilities to objects dynamically
e. Unique – ensures that the index key contains no duplicate values and v. Façade – a single class that represents an entire subsystem
therefore every row in the table/view is unique vi. Flyweight – a fine-grained instance used for efficient sharing
f. Columnstore –stores and manages data by using column-based data vii. Proxy – an object representing another object
storage and column-based query processing c. Behavioral
g. Index with included columns – a non-clustered index that is extended i. Chain of Responsibility – a way of passing a request between a
to include non-key columns chain of objects
h. Index on computed columns – index on a column derived from the ii. Command – encapsulate a command request as an object
value of one or more other columns iii. Interpreter – a way to include language elements in a program
i. Filtered – an optimized non-clustered index, especially suited to cover iv. Iterator – sequentially access the elements of a collection
queries that select from a well-defined subset of data; uses a filter v. Mediator – defines simplified communication between classes
predicate for indexing vi. Memento - capture and restore an object’s internal state
j. Spatial – provides ability to perform certain operations more vii. Observer – a way of notifying change to a number of classes
efficiently on spatial objects in a column of geometry data type viii. State – alter an object’s behavior when its state changes
k. XML – a shredded, persisted representation of XML binary large ix. Strategy – encapsulates an algorithm inside a class
objects (BLOBs) in the xml data type column x. Template Method – defer the exact steps of an algorithm to a
l. Full-text – token-based functional index built and maintained by subclass
Microsoft Full-Text Engine; used for sophisticated word searches in xi. Visitor – defines a new operation to a class without change
string data For more info, see: http://www.dofactory.com/net/design-patterns
9. What is the difference between a Union and Union all? – Union selects 2. Are you familiar with Software Development Methodology? Are you
related information from two tables whose selected columns need to be familiar with Agile, RAD, and Tiered Architecture? Can you explain each?
of the same data type; additionally, an implicit DISTINCT SORT is run on a. Agile – a conceptual framework that works in iterations (typically
the results set, therefore only distinct values are selected. Union All does lasting one to four weeks) with the intention of releasing new
the same but displays non-distinct values. Union can never have software at the end of every iteration; emphasis is on real-time
duplicate, repetitive results; Union All can. Union is sorted; Union All is communication and working software as measure of progress;
unsorted. sample methodologies: Crystal Methods, Dynamic Systems
Development Model (DSDM), and Scrum.
Additional Questions: b. Rapid Application Development – generally relates to faster
1. Are you familiar with Design Patterns? What Design Patterns did you use on implementation and saving time by reducing construction cycle via
your project before? – The 23 Gang of Four (GOF) patterns are considered using programming languages faster than 3rd-gen languages; faster
the foundation of all other patterns and as follows: development involves workshops, prototyping, user testing, software
a. Creational component reuse, informal communications
i. Abstract Factory – creates an instance of several families of c. Tiered Architecture – client-server architecture where presentation,
classes application processing/logic, data management functions are
ii. Builder – separates object construction from its representation physically separated into tiers/layers
For more info, see: http://www.itinfo.am/eng/software-development-
methodologies/
3. Have you experienced using TFS or any Source Control software on your
projects? – Team Foundation Server (and other source control software,
more or less) provides source code management, reporting, requirements
management, project management, automated builds, lab management,
testing and release management capabilities; it covers the entire
application lifecycle.
4. Have you experienced implementing TDD (Test Driven Development) on
one of your projects? – Test Driven Development relies on the repetition
of a very short development cycle: first the developer writes an (initially
failing) automated test case that defines a desired improvement or new
function, then produces the minimum amount of code to pass that test,
and finally refactors the new code to acceptable standards.
5. What is SOLID in Object-Oriented Design? – SOLID is the first five object-
oriented design principles which makes software development easily
maintainable and extensible. This stands for:
a. S – Single Responsibility Principle – A class should have one and only
one job.
b. O – Open-closed Principle – Objects should be open for extension but
closed for modification.
c. L – Liskov Substitution Principle – Every subclass/derived class should
be substitutable for their base/parent class.
d. I – Interface Segregation Principle – Classes should not be forced to
implement an interface it doesn’t use or depend on methods it
doesn’t use.
e. D – Dependency Inversion Principle – Entities must depend on
abstractions, not on concretions.
For more info, see: https://scotch.io/bar-talk/s-o-l-i-d-the-first-five-
principles-of-object-oriented-design

You might also like