Want to pass your GIAC GIAC Secure Software Programmer - C#.NET GSSP-NET exam in the very first attempt? Try Pass2lead! It is equally effective for both starters and IT professionals.
VCE
Session variables can be any valid __________.
A. .NET Framework type
B. Integer type
C. SessionStateItemCollection object
D. Object type
Hannah works as a Programmer in a college of Information Technology. The company uses Visual Studio .NET as its application development platform. The Dean of the college wants to obtain the performance report of each student. Hannah develops an application named StudentPerformanceReport by using Visual C# .NET. This application uses a SQL Server database named Database1 and a stored procedure named PROC1. PROC1 executes a query that returns the internal assessment result of each student. Hannah uses a TextBox control named AssessmentText in the application form named MyForm. She wants to display the total test result of each student in the AssessmentText text box control. StudentPerformanceReport uses a SqlCommand object to run PROC1. Hannah wants to write code to call PROC1. PROC1 contains an output parameter and displays its value as "@AssessmentResult" in text format. Which of the following code segments can Hannah use to accomplish this task?
Each correct answer represents a complete solution. Choose two.
A. AssessmentText.Text = (string)comm.Parameters["@AssessmentResult"].Value;
B. AssessmentText.Text = comm.Parameters["@AssessmentResult"].SourceColumn;
C. AssessmentText.Text = comm.Parameters["@AssessmentResult"].ToString();
D. AssessmentText.Text = comm.Parameters["@AssessmentResult"].Value.ToString();
David works as a Software Developer for McRobert Inc. He develops a Windows-based application, named App1, using Visual C# .NET. The application contains a Form control, named Form1. He wants to write code to initialize class-level variables, named Var1, Var2, and Var3, as soon as Form1 is instantiated. Which of the following code will he use to accomplish this?
A. private void Form1_Initialize(System.Object sender, System.EventArgs e) { int Var1 = 20; int Var2 = 40; int Var3 = 60; }
B. private void Form1_Load(System.Object sender, System.EventArgs e) { int Var1 = 20; int Var2 = 40; int Var3 = 60; }
C. private void Form1_New(System.Object sender, System.EventArgs e) { int Var1 = 20; int Var2 = 40; int Var3 = 60; }
D. private void Form1_Create(System.Object sender, System.EventArgs e) { int Var1 = 20; int Var2 = 40; int Var3 = 60; }