Home | Contact Us | Log In | Help
HOME NEW LISTING MOST POPULAR HIGHEST RATED SCRIPTS ADD SCRIPT DOWNLOADS FORUM
Tutorials
  ASP.Net & C#
  ASP
  Perl and PHP
  Java Scripts
  C and C++
  Ajax Tutorials
  J2ee, J2Me, Java
  Python & Ruby Rail
  Crystal Report
  Sap
  CGI
  XML
  Cold Fusion & CFML
  HTML, DHTML & CSS
  Dreamweaver
  FLASH
  Photoshop/Web Designing
  Tools & Utilities
  Oracle/D2K
  Sql Server
  MySql
  Domain Name Registration
  Remotely Hosting
  Web/Server Application
  Hotel Marketing
  Internet and Law
   Search Engine Optimization/SEO
E-Commerce
Interview Questions
< 1 2 3 > Next
ASP.Net & C# (INTERVIEW QUESTIONS) 1
  What is C#?
C# (see section on name, pronunciation) is an object-oriented programming language developed by Microsoft as part of the .NET initiative and later approved as a standard by ECMA and ISO. Anders Hejlsberg leads development of the C# language, which has a procedural, object-oriented syntax based on C++ and includes aspects of several other programming languages (most notably Delphi and Java) with a particular emphasis on simplification.
   
  Which is the new features of c# 2.0

New features in C# for the .NET SDK 2.0 (corresponding to the 3rd edition of the ECMA-334 standard) are:

  • Partial classes allow class implementation across more than one file. This permits breaking down very large classes, or is useful if some parts of a class are automatically generated.
    file1.cs:
    
    public partial class MyClass
      {
          public MyClass() 
         {
              // implementation 
         }
      } 
    file2.cs:
    
    public partial class MyClass 
     { 
       public SomeMethod()  
        { 
          // implementation 
         }
      }  
  • Generics or parameterized types. This is a .NET 2.0 feature supported by C#. Unlike C++ templates, .NET parameterized types are instantiated at runtime rather than by the compiler; hence they can be cross-language whereas C++ templates cannot. They support some features not supported directly by C++ templates such as type constraints on generic parameters by use of interfaces. On the other hand, C# does not support non-type generic parameters. Unlike generics in Java, .NET generics use reification to make parameterized types first-class objects in the CLI Virtual Machine, which allows for optimizations and preservation of the type information.
  • Static classes that cannot be instantiated, and that only allow static members. This is similar to the concept of module in many procedural languages.
  • A new form of iterator that provides generator functionality, using a yield return construct similar to yield in Python.
    // Method that takes an iterable input (possibly an array) and returns all even numbers.
     public static IEnumerable<int> GetEven(IEnumerable<int> numbers)
      {
        foreach (int i in numbers) 
         { 
          if (i % 2 == 0) yield return i;
          }
      } 
  • Anonymous delegates providing closure functionality.
    public void Foo(object parameter)
     { 
      // ...         ThreadPool.QueueUserWorkItem(delegate     
      {          
    // anonymous delegates have full access to local variables of the enclosing method
          if (parameter == ...)  
           {               // ...       
        }             // ...     
      });  
     }  
 
  Does C# support multiple-inheritance?

No

 
  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?

System.Object.

 
  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 is the diff 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.

 

< 1 2 3 > Next

  Copyright 2000-2006 © SoloScript.com, All rights reserved.