Top General Questions

Category: ASP.NET Questions    |    1 views    |    Add a Comment
  1. Does C# support multiple-inheritance?
    No. 
  2. Who is a protected class-level variable available to?
    It is available to any sub-class (a class inheriting this class). 
  3. 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.  
  4. Describe the accessibility modifier “protected internal”.
    It is available to classes that are within the same assembly and derived from the specified base class.  
  5. What’s the top .NET class that everything is derived from?
    System.Object.  
  6. 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.  
  7. 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.  
  8. 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. 
  9. Can you store multiple data types in System.Array?
    No.  
  10. 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. 
  11. How can you sort the elements of the array in descending order?
    By calling Sort() and then Reverse() methods.  
  12. What’s the .NET collection class that allows an element to be accessed using a unique key?
    HashTable.  
  13. What class is underneath the SortedList class?
    A sorted HashTable.  
  14. Will the finally block get executed if an exception has not occurred?­
    Yes. 
  15. 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 {}.  
  16. 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).  
  17. 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). 

Share/Save/Bookmark

 

ASP.NET Questions - 01

Category: ASP.NET Questions    |    1 views    |    Add a Comment
  1. Explain the .NET architecture.
  2. How many languages .NET is supporting now? - When .NET was introduced it came with several languages. VB.NET, C#, COBOL and Perl, etc. The site DotNetLanguages.Net says 44 languages are supported.
  3. How is .NET able to support multiple languages? - a language should comply with the Common Language Runtime standard to become a .NET language. In .NET, code is compiled to Microsoft Intermediate Language (MSIL for short). This is called as Managed Code. This Managed code is run in .NET environment. So after compilation to this IL the language is not a barrier. A code can call or use a function written in another language.
  4. How ASP .NET different from ASP? - Scripting is separated from the HTML, Code is compiled as a DLL, these DLLs can be executed on the server.
  5. Resource Files: How to use the resource files, how to know which language to use?
  6. What is smart navigation? - The cursor position is maintained when the page gets refreshed due to the server side validation and the page gets refreshed.
  7. What is view state? - The web is stateless. But in ASP.NET, the state of a page is maintained in the in the page itself automatically. How? The values are encrypted and saved in hidden controls. this is done automatically by the ASP.NET. This can be switched off / on for a single control
  8. Explain the life cycle of an ASP .NET page.
  9. How do you validate the controls in an ASP .NET page? - Using special validation controls that are meant for this. We have Range Validator, Email Validator.
  10. Can the validation be done in the server side? Or this can be done only in the Client side? - Client side is done by default. Server side validation is also possible. We can switch off the client side and server side can be done.
  11. How to manage pagination in a page? - Using pagination option in DataGrid control. We have to set the number of records for a page, then it takes care of pagination by itself.
  12. What is ADO .NET and what is difference between ADO and ADO.NET? - ADO.NET is stateless mechanism. I can treat the ADO.Net as a separate in-memory database where in I can use relationships between the tables and select insert and updates to the database. I can update the actual database as a batch.

 

Share/Save/Bookmark

 

What’s New in the .NET Framework Version 2.0 - 01

Category: ASP.NET Questions    |    0 views    |    Add a Comment

The Microsoft .NET Framework version 2.0 extends the .NET Framework version 1.1 with new features, improvements to existing features, and enhancements to the documentation. This section provides information about some key additions and modifications. 

For more information about breaking changes that might affect your application, see Breaking Changes in the .NET Framework. 

64-Bit Platform Support

  • enables the creation of applications that can run faster and take advantage of more memory than is available to 32-bit applications
  • support for 64-bit applications enables users to build managed code libraries
  • easily use unmanaged code libraries on 64-bit computers

For more information, see 64-bit Applications. 

Access Control List Support

  • An access control list (ACL) is used to grant or revoke permission to access a resource on a computer
  • New classes have been added to the .NET Framework that allow managed code to create and modify an ACL
  • New members that use an ACL have been added to the I/O, registry, and threading classes.

ADO.NET

  • New features in ADO.NET include support for user-defined types (UDT), asynchronous database operations, XML data types, large value types, snapshot isolation
  • New attributes that allow applications to support multiple active result sets (MARS) with SQL Server 2005

For more information about these and other new ADO.NET features, see What’s New in ADO.NET. 

ASP.NET

  • For Web page development, new controls make it easier to add commonly used functionality to dynamic Web pages
  • New data controls make it possible to display and edit data on an ASP.NET Web page without writing code
  • An improved code-behind model makes developing ASP.NET pages easier and more robust
  • Caching features provide several new ways to cache pages, including the ability to build cache dependency on tables in a SQL Server database
  • You can now customize Web sites and pages in a variety of ways
  • Profile properties enable ASP.NET to track property values for individual users automatically
  • Using Web Parts, you can create pages that users can customize in the browser
  • Master pages allow you to create a consistent layout for all the pages in a site, and themes allow you to define a consistent look for controls and static text
  • To help protect your sites, you can precompile a Web site to produce executable code from source files (both code files and the markup in .aspx pages). You can then deploy the resulting output, which does not include any source information, to a production server
  • By default, controls render output that is compatible with XHTML 1.1 standards. You can use device filtering to specify different property values on the same control for different browsers.

For a more complete list of new features in ASP.NET, see What’s New in ASP.NET.

Share/Save/Bookmark

 

.Net Framework 3.0

Category: Dot Net Questions    |    2 views    |    Add a Comment

Microsoft Corporate Vice President S. Somasegar announced that WinFX would be renamed the .NET Framework 3.0.

The .NET Framework 3.0 is Microsoft’s managed code programming model. It is a superset of the .NET Framework 2.0, combining .NET Framework 2.0 components with new technologies for building applications that have visually stunning user experiences, seamless and secure communication, and the ability to model a range of business processes. In addition to the .NET Framework 2.0, it includes Windows Presentation Foundation (WPF), Windows Workflow Foundation (WF), Windows Communication Foundation (WCF), and Windows CardSpace. The .NET Framework 3.0 is an additive release to the .NET Framework 2.0. 

There are no changes to the version of the .NET Framework 2.0 components included in the .NET Framework 3.0. This means that the millions of developers who use .NET today can use the skills they already have to start building .NET Framework 3.0 applications. It also means that applications that run on the .NET Framework 2.0 today will continue to run on the .NET Framework 3.0.

Here’s a look at the structure of the .NET Framework 3.0:

.NET Framework 3.0

Windows Communication Foundation

Windows Communication Foundation (formerly code-named “Indigo”) is a set of .NET technologies for building and running connected systems. It is a new breed of communications infrastructure built around the Web services architecture. Advanced Web services support in Windows Communication Foundation provides secure, reliable, and transacted messaging along with interoperability. The service-oriented programming model of Windows Communication Foundation is built on the Microsoft .NET Framework and simplifies development of connected systems. Windows Communication Foundation unifies a broad array of distributed systems capabilities in a composable and extensible architecture, spanning transports, security systems, messaging patterns, encodings, network topologies, and hosting models. Windows Communication Foundation will be available for Windows Vista™ as well as for Windows XP and Windows Server 2003.

Windows Presentation Foundation

The Microsoft Windows Presentation Foundation provides the foundation for building applications and high fidelity experiences in Windows Vista, blending together application UI, documents, and media content, while exploiting the full power of your computer. The functionality extends to the support for Tablet and other forms of input, a more modern imaging and printing pipeline, accessibility and UI automation infrastructure, data driven UI and visualization, as well as the integration points for weaving the application experience into the Windows shell.

Windows Workflow Foundation

Windows Workflow Foundation is the programming model, engine and tools for quickly building workflow enabled applications on Windows. It consists of a .NET Framework version 3.0 (formerly WinFX) namespace, an in-process workflow engine, and designers for Visual Studio 2005. Windows Workflow Foundation is available for both client and server versions of Windows. Windows Workflow Foundation includes support for both system workflow and human workflow across a wide range of scenarios including: workflow within line of business applications, user interface page-flow, document-centric workflow, human workflow, composite workflow for service oriented applications, business rule driven workflow and workflow for systems management.

Windows CardSpace

Windows CardSpace (formerly “InfoCard”) is a Microsoft .NET Framework version 3.0 (formerly WinFX) component that provides the consistent user experience required by the identity metasystem. It is specifically hardened against tampering and spoofing to protect the end user’s digital identities and maintain end-user control.

Share/Save/Bookmark