New Year Special 70% Discount Offer - Ends in 0d 00h 00m 00s - Coupon code: save70

GIAC Certification GSSP-NET-CSHARP Full Course Free

GIAC GIAC Secure Software Programmer - C#.NET Questions and Answers

Question 5

You work as a Software Developer for ABC Inc. The company uses Visual Studio.NET 2005 as its application development platform. You are creating a .NET remoting application using .NET Framework

2.0. You want to use a remote object whose lifetime is controlled by a server and the remote object is created for each client request. Which of the following objects will you use to accomplish the task?

Options:

A.

Client activated

B.

MarshalByRefObject

C.

Server activated Singleton

D.

Server activated SingleCall

Question 6

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. You are creating an application using .NET Framework 2.0.

The application is used to exchange structured and type information on the Web using Soap. You want to use the BinaryFormatter and SoapFormatter classes to support RPCs and serialization of a graph of objects. Which of the following interfaces will the BinaryFormatter and SoapFormatter classes implement to accomplish the task?

Each correct answer represents a part of the solution. Choose two.

Options:

A.

IFormatter

B.

IFormatable

C.

IRemotingFormatter

D.

IComparable

Question 7

You work as a Software Developer for ABC Inc. The company uses Visual Studio .NET 2005 as its application development platform. You create an application for the company. You need to validate the phone number passed to a class as a parameter in the application. Which of the following is the most effective way to verify that the format of the data matches a phone number?

Options:

A.

Regular expressions

B.

Nested If statements

C.

Use the String.Length property

D.

A try/catch block

Question 8

Peter works as a Software Developer for PaulTech Inc. He develops an application for office management, using Visual C# .NET. He creates an OleDbConnection object, named Pcon. He wants to create an OleDbCommand object to retrieve employee details. Which of the following statements will Peter use to set the CommandText and Connection properties to accomplish the required task?

Each correct answer represents a part of the solution. Choose three.

Options:

A.

OleDbCommand PCommand = new OleDbCommand("sp_GetDetails", PCon);

B.

PCommand.CommandType = "SELECT * FROM Employees";

C.

PCommand.Connection = Pcon;

D.

PCommand.CommandText = "SELECT * FROM Employees";

E.

PCommand.SetConnection (PCon);

F.

OleDbCommand PCommand = new OleDbCommand();