Check Your C# Experince Here

damoonica's Avatar, Join Date: Oct 2008
Light Poster
a place to add usefull problem like question specially for those who are going to be ready for MCTS 70-536
damoonica's Avatar, Join Date: Oct 2008
Light Poster
QUESTION 1
You work as the application developer at Certkiller .com. Certkiller .com uses Visual
Studio.NET 2005 as its application development platform.
You are in the process of storing numerical values up to 2,100,000,000 into a
variable and may require storing negative values using a .NET Framework 2.0
application. You are required to optimize memory usage
What should you do?
A. Int32
B. UInt16
C. UInt32
D. Int16
damoonica's Avatar, Join Date: Oct 2008
Light Poster
the answer will be available after 3 comments
Bitmatic's Avatar, Join Date: Nov 2008
Light Poster
Good one. http://www.codecharts.com/typeranges.php has the answer
The answer is Int32, since it can hold from -2,147,483,648 to 2,147,483,647.
damoonica's Avatar, Join Date: Oct 2008
Light Poster
You got it , the correct answer is A
so then check out the another question:

You work as an application developer at www.megaposts.net . You are currently in the

process of creating a class that stores data about Certkiller .com’s customers.

Certkiller .com customers are assigned unique identifiers and various characteristics

that may include aliases, shipping instructions, and sales comments. These

characteristics can change in both size and data type.

You start by defining the Customer class as shown below:

public class Customer

{
private int custID;

private ArrayList attributes;

public int CustomerID

{

get {return custID;}

}
public Customer (int CustomerID)

{

this.custID = CustomerID;

this.attributes = new ArrayList ();

}

public void AddAttribute (object att)

{

attributes.Add (att);

}

}
You have to create the FindAttribute method for locating attributes in Customer

objects no matter what the data type is.

You need to ensure that the FindAttribute method returns the attribute if found,

and you also need to ensure type-safety when returning the attribute.

What should you do?

A. Use the following code to declare the FindAttribute method:
public T FindAttribute (T att)

{

//Find attribute and return the value

}
B. Use the following code to declare the FindAttribute method:
public object FindAttribute (object att)

{

//Find attribute and return the value

}
C. Use the following code to declare the FindAttribute method:
public T FindAttribute <T> (T att)

{

//Find attribute and return the value

}
D. Use the following code to declare the FindAttribute method:
public string FindAttribute (string att)

{

//Find attribute and return the value

}