C Sharp

Value Type and Reference Type

What is Value Type and Reference Type?

Value types are variables that comyain the data directly instead of containing a reference to the data stored elsewhere in memory.  Instances of value types are stored in an area of memory called stack.

Be the first to comment - What do you think?  Posted by admin - March 22, 2010 at 11:08 am

Categories: C Sharp, Visual Basic   Tags: ,

C Sharp Ptactice Test Questions

You develop a Windows application by using the .NET Framework. The application makes use of an assembly named MyAssembly. The assembly file MyAssembly.dll is deployed in a folder named bin20 under the application’s root directory. The MyAssembly assembly is not strongly named.

You must configure the Windows application to specify the location of the MyAssembly assembly. Any settings that you change must not affect other applications installed on the system.

What should you do?

Question1

C Sharp Question1

The MyAssembly assembly is not strongly named. Any configuration to such an assembly must be made at the local level by using the application configuration file. You can use the
element to specify the path where the runtime should search for an assembly. This can be correctly done by using the following setting:
Specifying the file name as in the following setting is incorrect because you only need to specify the path name, and the runtime automatically loads the file containing the correct assembly from that path:

Modifying the machine configuration file is incorrect because you need to ensure that the changes do not affect other applications installed on the computer. The machine.config file is used by all applications on the computer.

Objective:

Embedding configuration, diagnostic, management, and installation features into a .NET Framework application.

Sub-Objective:

3.2 Create a custom Microsoft Windows Installer for .NET Framework components by using the System.Configuration.Install namespace, and configure .NET Framework applications by using configuration files, environment variables, and the .NET Framework Configuration tool (Mscorcfg.msc).

Be the first to comment - What do you think?  Posted by admin - March 9, 2010 at 3:55 pm

Categories: C Sharp, Certification   Tags: , ,

Defining a Function in C Sharp

Defining a function in C Sharp:

Be the first to comment - What do you think?  Posted by admin - February 18, 2010 at 12:32 am

Categories: ASP.net, C Sharp   Tags: , ,

Arrays In C Sharp

Here we will examine how Arrays are defined in C Sharp and used.

Read more...

Be the first to comment - What do you think?  Posted by admin - February 16, 2010 at 3:43 pm

Categories: C Sharp   Tags: , , ,

The if Statement in .net

If statment is very useful in decision making.  We will examine different ways of using if statment in VB and  C# (Visual basic and C Sharp).

The simplest use of an if statement is as follows:

if  (<condition>)
      <code executed if <test> is true>:

In this the code is executed when the test condition is true.

Additional code can be executed if the condition fails by adding else statement.

 else <code executed if <test> is false>;

Here is some example of testing some conditions.

if (checkbox1.Checked ==true)

if  (label1.BackColor == Color.Black)

if (numTiers == 4)

Be the first to comment - What do you think?  Posted by admin - February 4, 2010 at 10:46 pm

Categories: C Sharp, Visual Basic   Tags: , , ,