maandag 25 juni 2007

MCP worden deel IV (de examen dag)

De voorlopige laatste post van mijn MCP worden info.

De examen dag is een spannende dag waar het allemaal om draait.

Examen
Een examen bestaat uit 47 tot 52 vragen
Examens kunnen verdeeld zijn in verschillende onderdelen.
Er is voldoende tijd voor alle vragen
50 vragen 150 minuten
Geen kladpapier / 1 memoblok

De examen vragen
Geen open vragen
Maar:
Multiple choice - multiple answers
Vragen van een half a4 ‘tje
Spot the difference vragen
Hoe spel je DoDragDrop
Welke parameter komt eerst?
(int a, double b)

Een orginele voorbeeld vraag

You are creating a Windows Forms application that uses a drag-and-drop operation to
enable users to copy customer data between a ListBox control and RichTextBox control.
The ListBox displays a list of customer Ids to the user. Each item in the ListBox is
associated with a custom external data type named CustomerData. The data type stores
the customer name along with other customer information, including the address and
postal code.
You need to ensure that when the user drags a customer name from the ListBox to the
RichTextBox all of the information in your custom data type is moved into the
RichTextBox.
What should you do?

A. Initiate the drag-and-drop operation in the MouseDown event for the ListBox.
Call the DoDragDrop method for the ListBox, passing in an instance of CustomerData.
Use the GetFormats method in the DragEnter event for the RichTextBox to access the
custom data type.

B. Initiate the drag-and-drop operation in the MouseDown event for the ListBox.
Call the DoDragDrop method for the ListBox, passing in an instance of CustomerData.
Use the GetData method in the DragDrop event for the RichTextBox to access the
custom data type.

C. Initiate the drag-and-drop operation in the MouseDown event for the ListBox.
In the DragEnter or DragDrop events for the RichTextBox, set the Effect property to
DragDropEffects.All.
Use the GetFormats method in the DragEnter event for the RichTextBox to access the
custom data type.

D. Initiate the drag-and-drop operation in the MouseDown event for the ListBox.
In the DragEnter or DragDrop events for the RichTextBox, set the Effect property to
DragDropEffects.All.
Use the GetDataPresent method in the DragEnter event for the RichTextBox to access
the custom data type.


De orginele vraag
You are creating a Windows Forms application. Your application uses a custom control. The Custom control is based on a standard button control. You add several extra properties to the control. Some of these properties are read-only. You need to ensure that the read-only properties are not displayed in the Properties window of the design environment. What should you do?

Vereenvoudigd
  • Er is een custom control

  • De custom control heeft een read-only property

  • De property moet NIET in design time in de property window staan

Orginele antwoorden
A. Decorate the read-only properties by using the EditorBrowsable attribute, and then set the EditorBrowsable attribute to EditorBrowsableState.Never.
B. Use the DesignTimeVisible attribute, and then set the DesignTimeVisible attribute to False.
C. Decorate the read-only properties by using the Browsable attribute, and then set the Browsable attribute to False.
D. Decorate the read-only properties by using the DisplayName attribute, and then set the DisplayName attribute to null.


Vereenvoudigd
A. [EditorBrowsable(EditorBrowsableState.Never)]
B. [DesignTimeVisible]
C. [Browsable(false)]
D. [DisplayName(null)]


De oplossing
A. [EditorBrowsable(EditorBrowsableState.Never)]
Voor intellisense
B. [DesignTimeVisible]
Voor UI design tools (visual studio)
C. [Browsable(false)]
Het juiste antwoord
D. [DisplayName(null)]
De property name


Geen opmerkingen: