Posts Tagged ‘dot net’

General Dot Net Interview Questions

Friday, December 12th, 2008

Key differences in features of .NET 2.0 and 3.5? 
.NET 3.5 has more advanced feature than .NET 2.0.They are WCF, WPF, WCS,WF and LINQ.

Is Dot-Net platform dependent or platform indipendent?
Net is not platform independent as it needs .Net framework to run. As MS is the owner, so it is including .Net frameworks in latest versions of Windows.MS is providing service pack using which you can manage old versions of Windows and other operating systems like Unix, Linux. But not yet, .Net is running in UNIX and Linux. So it is not platform independent. As it comprises of lot of languages, you can say it as language independent.
MS is saying Windows is best operating system but they are developing Windows OS on Unix platform.Also Java, it is also not platform independent as it requires JVM (Java Virtual Machine to run). But the case is JVM is coming in all operating systems by default. So you can take it as platform independent.

What is CAS? 
CAS: CAS is the part of the .NET security model that determines whether or not a piece of code is allowed to run, and what resources it can use when it is running. For example, it is CAS that will prevent a .NET web applet from formatting your hard disk. How does CAS work? The CAS security policy revolves around two key concepts - code groups and permissions. Each .NET assembly is a member of a particular code group, and each code group is granted the permissions specified in a named permission set. For example, using the default security policy, a control downloaded from a web site belongs to the ‘Zone - Internet’ code group, which adheres to the permissions defined by the ‘Internet’ named permission set. (Naturally the ‘Internet’ named permission set represents a very restrictive range of permissions.) 

IIS port number? How We get it? 
IIS default port numbers for http is 80 , for https 81, and for ftp its 21. These are the default port numbers but we can override this port numbers while creating a website (either SSL or normal) and while creating a ftp folder. 

What is postback form and what is autopostback? 
PostBack: It means page automatically goes to server and we can just make a check whther our page is on server for the first time or not.
Propert Page.IspostBack== true means your page has made a server visit. It is only a readOnly property i.e. we can only check that, cannot set this property accordingly.
AutoPostBack: It is property for .net controls to allow them to post the page to server and execute code-behind code at their events.
By Default,Button has this property set to true. For other controls like DropDownList,RadioButtonList etc., we have to set set it to true if we want to perform an action at their events like selectedIndexChanged etc.

How can you tell the application to look for assemblies at the locations other than its own install? 
Use the directive in the XML .config file for a given application. Make Your Homepage.

VB.Net Interview Questions

Thursday, October 16th, 2008

What is the purpose of .net frame work? 
.Net Framework is an umbrella technology and has a lot of different technologies under it. For example, it
1. introduces Asp.net for web development
2. has languages to write Windows program, Windows services, Web Services.
3. pre-coded solutions to common programming problems     called base class library. It includes user interface data accessdatabase connectivity cryptography web application development, numeric algorithms, and network communications
4. a runtime or virtual machine that manages the execution of programs written specifically for the framework,
5. and a set of tools for configuring and building applications  like visual studio.
It also introduces language independence by introducing common language runtime. You can write code in any language.
The .NET Framework is a key Microsoft offering and is intended to be used by most new applications created for the Windows platform.

What is the difference between visual basic and visual basic dot net?
VB.NET is Microsoft’s Visual Basic implemented onto their .NET Framework. While Visual Basic is part of Visual Studio, VB.NET is also part of the Visual Studio.NET release.

What is JIT(Just In Time) and How it works? 
Before the code can be executed,the .NET framework needs to convert the IL into CPU-specific code.the Just-In-Time(JIT) compiler translates the code from IL into managed native code.During the compilation,the JIT compiler compiles only the code that is required during execution instead of compiling the complete IL code.when an uncompiled method is invoked during execution,the JIT compiler converts the IL for that method into native code.during this  the code is also checked for type safety,Type safety ensures that objects are always accessed in a compilation way.

Crystal Reports

How to Pass string value to crystal report 11?
Code for this

Dim crParameterFieldDefinitions As ParameterFieldDefinitions
Dim crParameterFieldDefinition AsParameterFieldDefinition
Dim crParameterValues As New ParameterValues
Dim crParameterDiscreteValue1 As NewParameterDiscreteValue

crParameterDiscreteValue1.Value = Trim(tbPRAM.Text) — text box to hold value

crParameterFieldDefinitions =cryRpt.DataDefinition.ParameterFields()
crParameterFieldDefinition = crParameterFieldDefinitions.Item(”PRAM”)
crParameterValues =crParameterFieldDefinition.CurrentValues

crParameterValues.Clear()
crParameterValues.Add(crParameterDiscreteValue1)

crParameterFieldDefinition.ApplyCurrentValues(crPar ameterValues)

parameter PRAM must be set in your report.

How does VB.NET/C# achieve polymorphism? 
You can achive polymorphism by doing overloading and overwriting.
 

Introduction to Visual Studio .NET

Tuesday, September 30th, 2008

Visual Studio.NET is based on the .NET framework.
Visual Studio.NET provides languages and tools that enable you to build Web-based, desktop, and mobile applications. You can also create Web services in Visual Studio.NET.

Visual Studio.NET includes the following programming languages:
1
. Visual Basic.NET
2. Visual C++.NET
3. Visual C#.NET
It also provides additional technologies, such as ASP.NET, that enable you to develop and deploy applications.In addition, Visual Studio.NET includes the MSDN library that contains documentation on various development  tools and applications.

Using the integrated development environment (IDE) of Visual Studio.NET, you can create applications in the various .NET languages. The IDE of Visual Studio.NET enables you to share tools and create applications in multiple languages.

Visual Studio.NET includes various enhancements over earlier versions of Visual Studio.

 New Features in Visual Basic :

Unlike Visual Basic 6.0, Visual Basic.NET is an object-oriented language.Visual Basic.NET supports the abstraction, encapsulation, inheritance, and polymorphism features.The earlier versions of Visual Basic, versions 4 through 6, supported interfaces but not implementation inheritance. Visual Basic.NET supports implementation inheritance as well as interfaces.Another new feature is overloading.In addition, Visual Basic.NET supports multithreading,which enables you to create multithreaded and scalable applications. Visual Basic.NET is also compliant with the common language specification (CLS) and supports structured exception handling.

Visual C# .NET
Visual Studio.NET provides a new language, Visual C#.NET, which is an object-oriented language based on the C and C++ languages. Using Visual C#.NET, you can create applications for the .NET framework. As mentioned earlier, Visual C#.NET supports the CLR, therefore, any code written in Visual C#.NET is managed code. The IDE provides various templates, designers, and wizards to help you create applications in Visual C#.NET.

Visual C++ .NET
Visual C++.NET is an enhanced version of Visual C++. Visual C++.NET includes features such as support for managed extensions and attributes.Managed extensions include a set of language extensions for C++ to enable you to create applications for the .NET framework. Using managed extensions, you can easily convert existing components to components that are compatible with the .NET framework. Therefore, with the help of managed extensions, you can reuse existing code and thus save both time and effort. In addition, by using managed extensions, you can combine both unmanaged and managed C++ code in an application.

The CLS is a set of rules and constructs that are supported by the CLR. Visual Basic.NET is a CLS-compliant language. Any objects, classes, or components that you create in Visual Basic.NET can be used in any other CLS-compliant language. In addition, you can use objects, classes, and components created in other CLScompliant languages in Visual Basic.NET. The use of the CLS ensures complete interoperability among applications, regardless of the language used to create the application. Therefore, while working in Visual Basic.NET, you can derive a class based on a class written in Visual C#.NET, and the data types and variables of the derived class will be compatible with those of the base class.

Visual C++.NET also supports attributes, which enable you to extend the functionality of the language and to simplify the creation of COM components. You can apply attributes to classes, data members, or member functions.

What are Web Forms ?
Visual Studio.NET introduces Web forms, which are based on Microsoft ASP.NET technology. Web forms are used to create Web pages. In Visual Studio.NET, you can drag controls to the designer and then add code to create Web pages. A Web forms page can open in any Web browser. The controls in a Web forms page are based on server-side logic.

What are Windows Forms ?
Windows forms provide a platform for developing Windows applications based on the .NET framework. Windows forms include a set of object-oriented and extensible classes that enable you to implement visual inheritance. Visual inheritance enables you to inherit a form from an existing form. Using these classes, you can develop Windows applications by creating a form based on an existing form. When you create forms based on existing forms, you can reuse code and thus enhance productivity. Typically,Windows forms are used to create user interfaces for a multitier application.

What are Web Services ?
Web services are applications that exchange data by using eXtensible Markup Language (XML). Web services can also receive requests over HTTP. Web services are not a part of any specific component technology. Therefore, any language or operating system can use Web Services. You can use Visual Basic.NET, Visual C#.NET, or ATL Server to create Web services.

XML(Extensible Markup Language)

XML is a markup language based on Standard Generalized Markup Language (SGML), which is a standard for all markup languages. XML is a subset of SGML. XML enables you to define the structure of data by using markup tags. In addition, you can also define new tags using XML.The World Wide Web Consortium (W3C) has defined XML standards to ensure that structured data is uniform and independent of applications.

Visual Studio.NET it also provides XML Designer, which enables you to create and edit XML documents and create XML schemas.

.NET Framework

Sunday, July 20th, 2008

The .NET Framework is a programming platform that is used for developing Windows and Web-based software.It has number of pre-coded solutions that manage the execution of programs written specifically for the framework.Different programming languages such as C#, VBScript, VB.NET, Managed C++ can be used for developing the applications in .NET Framework, as the .NET Framework is not dependent on one particular language or platform and can support many kinds of platforms and programming languages that are in use today. Further, you can use .NET Framework for running your applications in almost all platforms such as Linux, Macintosh and Unix without any hitches.
The presence of many off-the-shelf libraries in .NET Framework can assist you in developing your applications in a faster, cheaper and easier manner. The most recent .Net Framework version is capable of supporting over 20 different programming languages today.
The functionality of .Net Framework supporting many programming languages is due to the use of the powerful CLR, the Common Language Runtime engine. The application programming codes are first compiled by CLR into a Microsoft Intermediate Language (MSIL) code instead of native codes and the MSIL, which is nothing but an instruction set, in turn creates the native code for running the application.
The main advantage of language and platform independent feature of .NET Framework can be attributed to CLR and the same CLR also takes care of run-time services such as memory processes, security enforcement, integration of language, and thread management. Hence, you can make use of the various infrastructures that have been provided in .NET Framework for creating your web-applications.
As per the classification by the Microsoft, there are two categories of .NET Framework and they are the Common Language Runtime (CLR) and the .NET Framework class library(FCL).
Common Language Runtime: The CLR is responsible for providing a common runtime environment or services with which all .NET applications can run. Further, the various capabilities of CLR can enable any developer to write even big applications with ease using the features such as strong type naming, life-cycle management, dynamic binding that is capable of making any business logic into re-usable component and finally the cross-language exception handling.
.Net Framework class library: This class library constitutes various predefined functional sets that are very useful while developing the applications by developers. There are three main components in this class library and they are:
ASP.NET.
Windows Forms.
ADO.NET.
With the .Net Framework you can make your codes written in fewer lines and other favourable features such as easy web settings, easy deployment of applications, easy compilation procedures, easy Web configuration makes the .NET Framework a great platform to work with. In an overall scenario, the developers will be able to concentrate more on Web controls and spend an efficient time in application design and implementation and to have an effective control over the flow of the application sequence.
Another great feature that any developer can take note of is the feature of .NET Framework taking into cognisance all the Web controls, server-side blocks of codes and Web forms and getting them compiled whenever a call for the page compilation is completed.
Once the components of .NET framework are compiled in your machine, the compiled version can easily be uploaded with all the relevant pages in the /bin directory of the system. The process of uploading is very easy when compared to the complicated process of web-application in ASP, where in you have to first upload the application pages with the relevant components and you also need to register them with the operating system.
In .NET Framework the simple uploading in /bin directory of the operating system is enough and you need not carry out the complicated process of registering the components of web-application with the operating system.
With the help of an XML based web.config file you can carry out the web settings which is nothing but configuring the .NET applications for successful running. The XML based web.config file can be modified through a program and when any such modification is done, the system recognises the change and registers it immediately that makes configuration of .NET applications easy and quick.