[ Pobierz całość w formacie PDF ]

three)
A. Set labelTKValue.UseMnemonic to True.
B. Set labelTKValue.Text to  &Value .
C. Set labelTKValue.CausesValidation to True.
D. Set textTKValue.CausesValidation to True.
E. Set textTKValue.TabIndex to exactly one number less than labelValue.TabIndex.
F. Set textTKValue.TabIndex to exactly one number more than labelValue.TabIndex.
G. Set textTKValue.Location so that textValue overlaps with labelValue on the screen.
H. Add the following code to the Load event of MainForm:
text.Value.Controls.Add (labelValue);
Answer: A, B, F
Explanation: If the UseMnemonic property is set to true (A) and a mnemonic character (a character
preceded by the ampersand) is defined in the Text property of the Label (B), pressing ALT+ the mnemonic
character sets the focus to the control that follows the Label in the tab order (F). You can use this property to
provide proper keyboard navigation to the controls on your form.
Note1 The UseMnemonic property gets or sets a value indicating whether the control interprets an
ampersand character (&) in the control's Text property to be an access key prefix character. UseMnemonic is
set to True by default.
Note 2: As a practice verify the answer yourself.
Reference: NET Framework Class Library, Label.UseMnemonic Property [C#]
Incorrect Answers
C, D: The CausesValidation setting has no effect in this scenario.
E: The Text control must tabindex that is the successor to the tabindex of the label control.
G, H: This is not necessary. It has no effect here.
QUESTION NO: 121
You use Visual Studio .NET to develop a Windows-based application named Advocate Resource
Assistant (ARA): ARA contains a class named Client. The Client class is defines by the following code
segment:
namespace TestKing.Buslayer {
public class Client {
public string GetPhone(int ClientID) {
// More code goes here.
}
// Other methods goes here.
}
}
Leading the way in IT testing and certification tools, www.testking.com
- 104 -
070 - 316
The client class is invoked from ARA by using the following code segment:
Client client = new Client();
TxtPhone.Text = client.GetPhone(426089);
When you try to build your project, you receive the following error message:  Type  Client is not
defined .
What are two possible ways to correct this problem? (Each correct answer presents a complete
solution. Choose two)
A. Fully qualify the Client class with the TestKing.BusLayer namespace.
B. Fully qualify the Client class with the ARA namespace.
C. Add a using statement for the TestKing.BusLayer namespace in the ClientForm class.
D. Inherit the TestKing.BusLayer namespace in the ClientForm class.
Answer: A, C
Explanation:
A: The Client class was defined within the TestKing.Buslayer namespace. To reference it correctly we
could use the fully qualified name, using the TestKing.Buslayer namespace.
C: The using-namespace-directive imports the types contained in a namespace into the immediately
enclosing compilation unit or namespace body, enabling the identifier of each type to be used without
qualification.
Syntax:
using-namespace-directive: using namespace-name ;
Reference: C# Language Specification, Using namespace directives
Incorrect Answers
B: The ARA namespace would be of no use. The Client class is defined within the Fabrikam.Buslayer
namespace.
D: Namespaces cannot be inherited.
QUESTION NO: 122
You develop a Windows control named FormattedTextBox, which will be used by many developers in
your company TestKing Inc. FormattedTextBox will be updated frequently.
You create a custom bitmap image named CustomControl.bmp to represent FormattedTextBox in the
Visual Studio .NET toolbox. The bitmap contains the current version number of the control, and it
will be updated each time the control is updated. The bitmap will be stored in the application folder.
If the bitmap is not available, the standard TextBox control bitmap must be displayed instead.
Which class attribute should you add to FormattedTextBox?
Leading the way in IT testing and certification tools, www.testking.com
- 105 -
070 - 316
A. [ToolboxBitmap(typeof(TextBox))[
class FormattedTextBox
B. [ToolboxBitmap(@ CustomControl.bmp )]
class FormattedTextBox
C. [ToolboxBitmap(typeof(TextBox),  CustomControl.bmp )]
class FormattedTextBox
D. [ToolboxBitmap(typeof(TextBox))] [ToolboxBitmap(@ CustomControl.bmp )]
class FormattedTextBox
Answer: B
Explanation: You specify a Toolbox bitmap by using the ToolboxBitmapAttribute class. The
ToolboxBitmapAttribute is used to specify the file that contains the bitmap.
Reference: 70-306/70-316 Training kit, To provide a Toolbox bitmap for your control, Page 355-356
Incorrect Answers
A, C, D: If you specify a Type (type), your control will have the same Toolbox bitmap as that of the Type
(type) you specify.
QUESTION NO: 123
You use Visual Studio .NET to develop applications for your human resources department at
TestKing. You create the following interfaces:
public interface IEmployee {
double Salary();
}
public interface IExecutive: IEmployee {
double AnnualBonus();
}
The IEmployee interface represents a generic Employee concept. All actual employees in your
company should be represented by interfaces that are derived from IEmployee.
Now you need to create a class named Manager to represent executives in your company. You want to
create this class by using the minimum amount of code.
Which code segment or segments should you include in Manager? (Choose all that apply)
A. public class Manager:IExecutive
B. public class Manager:IEmployee, IExecutive
C. public class Manager:IEmployee
D. public class Manager:IExecutive, IEmployee
E. public double Salary()
F. public double AnnualBonus()
Leading the way in IT testing and certification tools, www.testking.com
- 106 -
070 - 316
Answer: A, E, F [ Pobierz całość w formacie PDF ]

  • zanotowane.pl
  • doc.pisz.pl
  • pdf.pisz.pl
  • razem.keep.pl