Posts Tagged ‘visual basic’

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.