| 70-540 Exam |
| 70-540 - Exam Information |
| Question of the day |
You are creating a Microsoft Windows Mobilebased application. The application contains a Windows Form that has a text box control named TxtSalary. The application also contains a class named Employee that has a property named Salary. You create an instance of the Employee class named emp in the Windows Form. You need to write the code segment that binds TxtSalary to emp. You also need to ensure that the code segment displays the salary of an employee as a currency value prefixed by the currency symbol. Which code segment should you use?
Answer(s)
Dim bind As Binding = New Binding("Text", emp, "Salary")bind.FormattingEnabled = Truebind.FormatString = "C"TxtSalary.DataBindings.Add(bind)