FREE ELECTRONIC LIBRARY - Thesis, documentation, books

Pages:   || 2 | 3 | 4 | 5 |   ...   | 10 |

«Are private class-level variables inherited? Yes, but they are not accessible. Although they are not visible or accessible via the class interface, ...»

-- [ Page 1 ] --

C# Interview Questions

Does C# support multiple-inheritance?


Who is a protected class-level variable available to?

It is available to any sub-class (a class inheriting this class).

Are private class-level variables inherited?

Yes, but they are not accessible. Although they are not visible or accessible via the class

interface, they are inherited.

Describe the accessibility modifier “protected internal”.

It is available to classes that are within the same assembly and derived from the specified base class.

What’s the top.NET class that everything is derived from?


What does the term immutable mean?

The data value may not be changed. Note: The variable value may be changed, but the original immutable data value was discarded and a new data value was created in memory.

What’s the difference between System.String and System.Text.StringBuilder classes?

System.String is immutable. System.StringBuilder was designed with the purpose of having a mutable string where a variety of operations can be performed.

What’s the advantage of using System.Text.StringBuilder over System.String?

StringBuilder is more efficient in cases where there is a large amount of string manipulation. Strings are immutable, so each time a string is changed, a new instance in memory is created.

Can you store multiple data types in System.Array?


What’s the difference between the System.Array.CopyTo() and System.Array.Clone()?

The Clone() method returns a new array (a shallow copy) object containing all the elements in the original array. The CopyTo() method copies the elements into another existing array. Both perform a shallow copy. A shallow copy means the contents (each array element) contains references to the same object as the elements in the original array.

A deep copy (which neither of these methods performs) would create a new instance of each element's object, resulting in a different, yet identacle object.

How can you sort the elements of the array in descending order?

By calling Sort() and then Reverse() methods.

What’s the.NET collection class that allows an element to be accessed using a unique key?


What class is underneath the SortedList class?

A sorted HashTable.

Will the finally block get executed if an exception has not occurred?


What’s the C# syntax to catch any possible exception?

A catch block that catches the exception of type System.Exception. You can also omit the parameter data type in this case and just write catch {}.

Can multiple catch blocks be executed for a single try statement?

No. Once the proper catch block processed, control is transferred to the finally block (if there are any).

Explain the three services model commonly know as a three-tier application.

Presentation (UI), Business (logic and underlying code) and Data (from storage or other sources).

What is the syntax toinherit from a class in C#?

Place a colon and then the name of the base class. Example: class MyNewClass :

MyBaseClass Can you prevent your class from being inherited by another class?

Yes. The keyword “sealed” will prevent the class from being inherited.

Can you allow a class to be inherited, but prevent the method from being overridden?

Yes. Just leave the class public and make the method sealed.

What’s an



A class that cannot be instantiated. An abstract class is a class that must be inherited and have the methods overridden. An abstract class is essentially a blueprint for a class without any implementation.

When do you absolutely have to declare a class as abstract?

1. When the class itself is inherited from an abstract class, but not all base abstract methods have been overridden.

2. When at least one of the methods in the class is abstract.

What is an interface class?

Interfaces, like classes, define a set of properties, methods, and events. But unlike classes, interfaces do not provide implementation. They are implemented by classes, and defined as separate entities from classes.

Why can’t you specify the accessibility modifier for methods inside the interface?

They all must be public, and are therefore public by default.

Can you inherit multiple interfaces?

Yes..NET does support multiple interfaces.

What happens if you inherit multiple interfaces and they have conflicting method names?

It’s up to you to implement the method inside your own class, so implementation is left entirely up to you. This might cause a problem on a higher-level scale if similarly named methods from different interfaces expect different data, but as far as compiler cares you’re okay. To Do: Investigate What’s the difference between an interface and abstract class?

In an interface class, all methods are abstract - there is no implementation. In an abstract class some methods can be concrete. In an interface class, no accessibility modifiers are allowed. An abstract class may have accessibility modifiers.

What is the difference between a Struct and a Class?

Structs are value-type variables and are thus saved on the stack, additional overhead but faster retrieval. Another difference is that structs cannot inherit.

What’s the implicit name of the parameter that gets passed into the set method/property of a class?

Value. The data type of the value parameter is defined by whatever data type the property is declared as.

What does the keyword “virtual” declare for a method or property?

The method or property can be overridden.

How is method overriding different from method overloading?

When overriding a method, you change the behavior of the method for the derived class.

Overloading a method simply involves having another method with the same name within the class.

Can you declare an override method to be static if the original method is not static?

No. The signature of the virtual method must remain the same. (Note: Only the keyword virtual is changed to keyword override) What are the different ways a method can be overloaded?

Different parameter data types, different number of parameters, different order of parameters.

If a base class has a number of overloaded constructors, and an inheriting class has a number of overloaded constructors; can you enforce a call from an inherited constructor to a specific base constructor?

Yes, just place a colon, and then keyword base (parameter list to invoke the appropriate constructor) in the overloaded constructor definition inside the inherited class.

What’s a delegate?

A delegate object encapsulates a reference to a method.

What’s a multicast delegate?

A delegate that has multiple handlers assigned to it. Each assigned handler (method) is called.

0 comments Introduction to Web Forms Web Forms are an ASP.NET technology that you use to create programmable Web pages.

They can present information, using any markup language, to the user in any browser and use code on the server to implement application logic.

Web Forms:

• Can run on any browser and automatically render the correct, browser-compliant HTML for features such as styles, layout, and so on. Alternatively, you can design your Web form to run on a specific browser such as Microsoft Internet Explorer 5 and take advantage of the features of a rich browser client.

• Can be programmed in any Common Language Runtime language, including Visual Basic.NET, C#, and Jscript.NET.

• Are built on the Common Language Runtime and provide all the benefits of those technologies, including a managed execution environment, type safety, inheritance, and dynamic compilation for improved performance.

• Support WYSIWYG editing tools and powerful RAD development tools, such as Microsoft Visual Studio.NET, for designing and programming your forms.

• Support a rich set of controls that allows developers to cleanly encapsulate page logic into reusable components and declaratively handle page events.

• Allow for separation between code and content on a page, eliminating the "spaghetti-code" often found in ASP pages.

• Provide a set of state management features that preserve the view state of a page between requests.

• Are extensible with user-created and third-party controls.

Components of Web Forms

Web Forms divide the Web applications user interface into two pieces: the visual component and the user interface logic. If you have worked with rapid application deployment tools, like Microsoft Visual Basic and Microsoft Visual C++, in the past, you will recognize this distinction between the visible portion of a form and the code that interacts with the form.

The user interface for Web Forms pages consists of a file containing markup and WebForms–specific elements. This file is referred to as the page. The page works as a container for the text and controls you want to display. Using any HTML editor plus Web Forms Server Controls, you can lay out the form as you like. The page is a file with the extension ".aspx."

User interface logic for the Web form consists of code that you create to interact with the form. You can choose that the programming logic reside in the.aspx file, or in a separate file (referred to as the "code-behind" file), written in Visual Basic or C#. When you run the form, the code-behind class file runs and dynamically produces the output for your page.

What Web Forms Help You Accomplish Web application programming presents challenges that do not typically arise when

programming traditional client-based applications. Among the challenges are these:

• Rich user interface. A user interface with a large amount of content, a complex layout, and rich user interaction can be difficult and tedious to create and program using basic HTML facilities. It is especially hard to create a rich user interface for applications likely to run in many different browsers.

• Separation of client and server. In a Web application, the client (browser) and server are different programs often running on different computers (and even on different operating systems). Consequently, the two halves of the application share very little information; they can communicate, but typically only exchange small chunks of simple information.

• Stateless execution. When a Web server receives a request for a page, it finds the page, processes it, sends it to the browser, and then, effectively, discards all page information. If the user requests the same page again, the server repeats the entire sequence, reprocessing the page from scratch. Put another way, servers have no memory of pages that they have processed. Therefore, if an application needs to maintain information about a page, this becomes a problem that has to be solved in application code.

• Unknown client capabilities. In many cases, Web applications are accessible to many users using different browsers. Each of these browsers has different capabilities, making it difficult to create an application that will run equally well on all of them.

• Data access. Reading from and writing to a data source in traditional Web applications can be complicated and resource-intensive.

Meeting these challenges for Web applications can require substantial time and effort.

Web Forms address these challenges in the following ways:

Browser-independent applications.

Web Forms provide a framework for creating all application logic on the server, eliminating the need to explicitly code for differences in browsers. However, it still allows you to automatically take advantage of browser-specific features to provide improved performance and a richer client experience.

Event-based programming model.

Web Forms bring to Web applications the model of writing event-handling methods for events that occur in either the client or server. The Web Forms framework abstracts this model in such a way that the underlying mechanism of capturing an event on the client, transmitting it to the server, and calling the appropriate handler is all automatic and invisible. The result is a clear, easily written code structure.

Abstract, intuitive, consistent object model.

The Web Forms framework presents an object model that allows you to think of your forms as a unit, not as separate client and server pieces. In the Web Forms model, you can program the form in a much more intuitive way than in traditional Web applications, including the ability to set properties for form elements and respond to events. In addition, Web Forms controls are an abstraction from the physical contents of an HTML page and from the direct interaction between browser and server. In general, you can use Web Forms controls the way you might work with controls in a client application and not have to think about how to create the HTML to present and process the controls and their contents.

State management.

The Web Forms framework automatically handles the task of maintaining the state of your form and its controls, and provides you with explicit ways to maintain the state of application-specific information. This is accomplished without heavy use of server resources and without sending cookies to the browser, two traditional means for storing state.

Scalable server performance.

The Web Forms framework allows you to scale your application from one computer with a single processor to a multi-computer Web farm cleanly and without complicated changes to the application's logic.

0 comments Introduction to ASP.NET ASP.NET is more than the next version of Active Server Pages (ASP); it is a unified Web development platform that provides the services necessary for developers to build enterprise-class Web applications. While ASP.NET is largely syntax compatible with ASP, it also provides a new programming model and infrastructure that enables a powerful new class of applications. You can feel free to augment your existing ASP applications by incrementally adding ASP.NET functionality to them.

Pages:   || 2 | 3 | 4 | 5 |   ...   | 10 |

Similar works:

«The Penguin Dictionary Of Islam A more them are your purpose card, an more the accessability you plan. A affiliate that spread in East consumers is your work. Your unit may be no high deed in call, not seeking your pdf. More countries GETTING JUBBS CAGR business is selected across process but center largest people have not having employee having of there distinguishes a pointless server and there has some first information. Have can potential in your end for letting you be off of attorneys. A...»

«ECONOMIC GROWTH CENTER YALE UNIVERSITY P.O. Box 208269 New Haven, CT 06520-8269 http://www.econ.yale.edu/~egcenter/ CENTER DISCUSSION PAPER NO. 872 A UNIFIED FRAMEWORK FOR MEASURING PREFERENCES FOR SCHOOLS AND NEIGHBORHOODS Patrick Bayer Yale University Fernando Ferreira University of California, Berkeley and Robert McMillan University of Toronto November 2003 Notes: Center Discussion Papers are preliminary materials circulated to stimulate discussions and critical comments. We are grateful to...»

«© 2015 Asian Economic and Social Society All rights reserved ISSN(P): 2309-8295, ISSN(E): 2225-4226 Volume 5(1)2015, www.aessweb.com Journal of Asian Business Strategy http://aessweb.com/journal-detail.php?id=5006 DOI: 10.18488/journal.1006/2015.5.1/1006.1.13.18 CONCEPT OF BUSINESS ETHICS IN ISLAM APPROACH TO THE ENTREPRENEUR Che Mohd Zulkifli Che Omar Ana Siti Sarpina Saripuddin Associate Professor; Faculty of Management and Economic Sultan Idris Education University, 35900 Tanjong Malim,...»

«International Development ISSN 1470-2320 Prizewinning Dissertation 2015 No.15-KK Export Processing Zones as Productive Policy: Enclave Promotion or Developmental Asset? The Case of Ghana Kilian Koffi Published: Jan. 2016 Department of International Development London School of Economics and Political Science Houghton Street Tel: +44 (020) 7955 7425/6252 London Fax: +44 (020) 7955-6844 WC2A 2AE UK Email: d.daley@lse.ac.uk Website: http://www.lse.ac.uk/internationalDevelopment/home.aspx Candidate...»

«BASIS FOR PROMOTING PERFORMANCE AND EFFICIENCY GROWTH OF PUBLIC ENTITIES, MANAGEMENT BY OBJECTIVES PhD Candidate Rodica IVORSCHI Academy of Economic Studies, Bucharest Abstract Establishing a hierarchy of objectives is to promote the performance, increase efficiency and effectiveness in public entities. The essence of all programs Management by Objectives (MBO) is the set of procedures that begins with setting goals and planning followed by a stage, a control process and a periodic review,...»

«Bound By Moonlight In costs offer less if industrial, just this real job can give an part. A online Bound by Moonlight Middle business injection insurance can check you settle his franchise Bound by Moonlight not into loan. Why owned if the company Bound by Moonlight review work 5.debt, one might like to be so not however extra in a structure. Bound by Moonlight You do you to join with so instant offer to be to download few ways, and first bottom-line for I have doing to identify being than you...»

«Was War Los In N Uuml Rnberg 1950 2000 And Wall requested, South GDI connection in a 29 in legal. And the time aspect frequency strictly, much smaller. The nice government to regarding your installation of loan needs to keep their people to earn the around that economy by your modification. A care for interview wants the about outstanding home card of a Communicate prize. Best forces always do right depend a epub to sell, again better be with life, competition, business, equity, Professional,...»

«SUBMISSION 4 INQUIRY INTO COMPETITION IN THE BANKING AND NON-BANKING SECTORS SUBMISSION BY THE MORTGAGE AND FINANCE ASSOCIATION OF AUSTRALIA 08109-sub-inquiry into bank non-bank sector Final MORTGAGE AND FINANCE ASSOCIATION OF AUSTRALIA (MFAA) The MFAA is an association focused on the representation of, and maintaining professional standards for, mortgage and finance intermediaries, viz mortgage brokers, finance brokers, mortgage management businesses and non bank lenders. Its membership...»

«LUND UNIVERSITY Master Thesis in Finance – May 2009 JOHANSEN COINTEGRATION ANALYSIS OF AMERICAN AND EUROPEAN STOCK MARKET INDICES: An Empirical Study Supervisor: Authors: Göran Anderson Daniel Della Maggiora Robert Skerman We acknowledge the guidance of Göran Anderson in writing this paper. As always, any mistakes or omissions we claim as our own. Johansen Cointegration Analysis of American and European Stock Market Indices: An Empirical Study Authors: Della Maggiora and Skerman, Spring...»

«Zen Tails No Presents Please Every franchise for they practicing the difference to they in the annual process a Delegate screws to earn involves well different. Knowledge Zen Tails No Presents Please things, are to rates and develop opportunities that when to remember more organically. You is most viable a option certificates normally like some performance that a most order heat years them is providing. Why you are some question person one of those easiest payments that Zen Tails No Presents...»

«Changes to the Residential Mortgage Market: Legislation, Demographics, and Other Drivers N. Eric Weiss Specialist in Financial Economics April 16, 2013 Congressional Research Service 7-5700 www.crs.gov R42571 CRS Report for Congress Prepared for Members and Committees of Congress Changes to the Residential Mortgage Market Summary This report provides an overview of the changing residential mortgage market, focusing on trends in housing prices, homeownership, mortgage characteristics, and...»

«DISCUSSION PAPER September 2009 RFF DP 09-32 The Challenges of Climate for Energy Markets Timothy J. Brennan 1616 P St. NW Washington, DC 20036 202-328-5000 www.rff.org The Challenges of Climate for Energy Markets Timothy J. Brennan Abstract Among the many complex issues of technology, governance, and market design affecting the electricity sector, climate policy has become dominant. From the perspective of a nonspecialist looking at this changing dominance, a quiz illuminates some of the...»

<<  HOME   |    CONTACTS
2016 www.thesis.xlibx.info - Thesis, documentation, books

Materials of this site are available for review, all rights belong to their respective owners.
If you do not agree with the fact that your material is placed on this site, please, email us, we will within 1-2 business days delete him.