单选题You are creating a DataTable. You use the following code segment to create the DataTable. (Line numbers are included for reference only.) 01 Dim dt As New DataTable("Products") 02 dt.Columns.Add(New DataColumn("Price", _ GetType(Decimal))) 03 dt.Columns.Add(New DataColumn("Quantity", _ GetType(Int32))) 04 Dim dc As DataColumn = New DataColumn("Total", _ GetType(Decimal)) 05 dt.Columns.Add(dc) You need to ensure that the Total column is set to the value of the Price column multiplied by the Quantity column when new rows are added or changed. What should you do? ()AAdd the following code segment after line 05. dc.ExtendedProperties(Total) = Price * QuantityBAdd the following code segment after line 05. dc.Expression = Price * QuantityCWrite an event handler for the DataTable's TableNewRow event that updates the row's Total.DWrite an event handler for the DataTable's ColumnChanged event that updates the row's Total.

单选题
You are creating a DataTable. You use the following code segment to create the DataTable. (Line numbers are included for reference only.) 01 Dim dt As New DataTable("Products") 02 dt.Columns.Add(New DataColumn("Price", _ GetType(Decimal))) 03 dt.Columns.Add(New DataColumn("Quantity", _ GetType(Int32))) 04 Dim dc As DataColumn = New DataColumn("Total", _ GetType(Decimal)) 05 dt.Columns.Add(dc) You need to ensure that the Total column is set to the value of the Price column multiplied by the Quantity column when new rows are added or changed. What should you do? ()
A

Add the following code segment after line 05. dc.ExtendedProperties(Total) = Price * Quantity

B

Add the following code segment after line 05. dc.Expression = Price * Quantity

C

Write an event handler for the DataTable's TableNewRow event that updates the row's Total.

D

Write an event handler for the DataTable's ColumnChanged event that updates the row's Total.


参考解析

解析: 暂无解析

相关考题:

You need to write a code segment that transfers the contents of a byte array named dataToSendby using a NetworkStream object named netStream.You need to use a cache of size 8,192 bytes.Which code segment should you use?()A.B.C.D.

You are creating a class that performs complex financial calculations.The class contains a method named GetCurrentRate that retrieves the current interest rate and a variable named currRate that stores the current interest rate.You write serialized representations of the class.You need to write a code segment that updates the currRate variable with the current interest ratewhen an instance of the class is deserialized.Which code segment should you use?()A.B.C.D.

Certkiller.com is currently using a performance counter named HitCounter.You are required to increment each time a user accesses the UI classes within the application.To do this, you start by creating performance counters using the following code:GRAFIK - wird nicht fr Antwort ben?tigt !!!You have to adjust the HitCounter performance counter when a hit occurs.What should you do?()A.B.C.D.

You use Microsoft .NET Framework 4 to create a Windows Forms client application.You write the following code segment.The application contains a form of type Form1 that contains a FormSettings object named frmSettings1.You need to maintain the user‘s form size preference each time the user executes the application.Which code segment should you use? ()A.B.C.D.

You have an SQL query that takes one minute to execute. You use the following code segment to execute theSQL query asynchronously.Dim ar As IAsyncResult = cmd.BeginExecuteReader()You need to execute a method named DoWork() that takes one second to run while the SQL query is executing.DoWork() must run as many times as possible while the SQL query is executing.Which code segment should you use?()A.B.C.D.

You are creating an application that consumes a Windows Communication Foundation (WCF) service. The service implements the IService contract. The client application contains the CallbackHandler class, which implements IServiceCallback.You need to ensure that a client proxy is created that can communicate with the service over a duplex channel.Which code segment should you use?()A.B.C.D.

You use Microsoft .Net Framework 4 to create a Windows Form application. You created a new application, you then wrote the code below: Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture Which of the following options are TRUE? ()A、The user interface will make use of the currently configured culture settings in the Control Panel at present.B、The user interface will make use of new culture settings.C、The user interface will make use of the culture settings that were installed with the operating system.

You work as an application developer at Certkiller .com. Certkiller .com wants you to develop an application that stores and retrieves client information by means of a unique account number.You create a custom collection class, which implements the IDictionary interface,named ClientDictionary. The following code have been included into the new application. //Create Client objects Client c1 = new Client ("AReid", "Andy Reid", Status.Current); Client c2 = new Client ("DAustin", "Dean Austin", Status.New); //Create ClientDictionary object IDictionary cData = new ClientDictionary (); cData.Add ("10001", c1); cData.Add ("10002", c2); You use the same method to add other Client objects to the collection. You need to ensure that you are able to retrieve client information associated with the account number 10111.What should you do?()A、 Use the following code: Client foundClient;foundClient = (Client) cData.Find ("10111"); B、 Use the following code: Client foundClient;if (cData.Contains ("10111")) foundClient = cData ["10111"]; C、 Use the following code: Client foundClient;if (cData.Contains ("10111"))foundClient =(Client) cData ["10111"]; D、 Use the following code: Client foundClient;foreach (string key in cData.Keys {if (key == "10111")foundClient = (Client) cData.Values ["10111"]; }

Which of the following statements are true when creating NETBIOS names? ()A、 NETBIOS names can only use alphanumeric characters.B、 You can use a ’.’ in a NETBIOS name.C、 You can use an ’_’ (underscore) in a NETBIOS name.D、 NETBIOS names must be UPPERCASEE、 NETBIOS names can be a maximum of 32 characters

You work as an application developer at Certkiller .com. You have recently created an application domain for Certkiller .com. A few weeks later you are asked to retrieve information from this application domain, which is the current application domain. What can you do to achieve this objective?()A、 Use the following code: AppDomain appInfo = ApplicationDomain.Current;B、 Use the following code: AppDomain appInfo = AppDomain.CurrentDomain ();C、 Use the following code: AppDomain appInfo = Thread.GetDomain ();D、 Use the following code: AppDomain appInfo = MainThread.GetDomain ();

You develop a Web application that writes data to a file on a server. You restrict access to the file to specific Windows users. The Web application runs as CONTOSO/ASPNET. You deny anonymous access to the application in IIS. You add the following XML segment in the Web.config file.You need to ensure that the application meets the following requirements:It must impersonate the user when it writes data to the file.It must run as CONTOSO/ASPNET when a user does not access the file. Which two actions should you perform? ()A、Use the following XML segment in the Web.config file. identity impersonate="false"/B、Use the following XML segment in the Web.config file. identity impersonate="true"/C、Use the following code segment to access the file. Dim wp As WindowsPrincipal = _CType(HttpContext.Current.User, WindowsPrincipal) Dim wi As WindowsIdentity = WindowsIdentity.GetCurrent() Dim wic As WindowsImpersonationContext = wi.Impersonate()' Access the file herewic.Undo()D、Use the following code segment to access the file. Dim wi As WindowsIdentity = WindowsIdentity.GetCurrent()Dim wic As WindowsImpersonationContext = _WindowsIdentity.Impersonate(wi.Token)' Access the file herewic.Undo()

You are creating a DataTable. You use the following code segment to create the DataTable. (Line numbers are included for reference only.) 01 Dim dt As New DataTable("Products") 02 dt.Columns.Add(New DataColumn("Price", _ GetType(Decimal))) 03 dt.Columns.Add(New DataColumn("Quantity", _ GetType(Int32))) 04 Dim dc As DataColumn = New DataColumn("Total", _ GetType(Decimal)) 05 dt.Columns.Add(dc) You need to ensure that the Total column is set to the value of the Price column multiplied by the Quantity column when new rows are added or changed. What should you do? ()A、Add the following code segment after line 05. dc.ExtendedProperties("Total") = "Price * Quantity"B、Add the following code segment after line 05. dc.Expression = "Price * Quantity"C、Write an event handler for the DataTable's TableNewRow event that updates the row's Total.D、Write an event handler for the DataTable's ColumnChanged event that updates the row's Total.

You are creating an undo buffer that stores data modifications.You need to ensure that the undo functionality undoes the most recent data modifications first.You also need to ensure that the undo buffer permits the storage of strings only.Which code segment should you use?()A、Stackstring undoBuffer=new Stackstring();B、Stack undoBuffer=new Stack();C、Queuestring undoBuffer=new Queuestring();D、Queue undoBuffer=new Queue();

You use Microsoft .NET Framework 4 to create a Windows Presentation Foundation (WPF) application. You want to add an audio player that plays .wav or .mp3 files when the user clicks a button. You plan to store the name of the file to a variable named SoundFilePath. You need to ensure that when a user clicks the button, the file provided by SoundFilePath plays. What should you do?()A、Write the following code segment in the button onclick event. System.Media. SoundPlayer player = new System.Media. SoundPlayer(SoundFilePath); player.play();B、Write the following code segment in the button onclick event. MediaPlayer player = new MediaPlayer(); player.Open(new URI(SoundFilePath), UriKind.Relative)); player.play();C、Use the following code segment from the PlaySound() Win32 API function and call the PlaySound function in the button onclick event. [sysimport(dll="winmm.dll")] public static extern long PlaySound(String SoundFilePath, long hModule, long dwFlags);D、Reference the Microsoft.DirectX Dynamic Link Libraries. Use the following code segment in the button onclick event. Audio song = new Song(SoundFilePath); song.CurrentPosition = song.Duration; song.Play();

You use the following declaration to add a Web user control named TestUserControl.ascx to an ASP.NET page named TestPage.aspx.    You add the following code to the code-behind file of TestPage.aspx.  private void TestMethod(){ ...}You define the following delegate.  public delegate void MyEventHandler();  You need to add an event of type MyEventHandler named MyEvent to TestUserControl.ascx and attach the page’s TestMethod method to the event. Which two actions should you perform?()A、Add the following line of code to TestUserControl.ascx.cs. public event MyEventHandler MyEvent;B、Add the following line of code to TestUserControl.ascx.cs. public MyEventHandler MyEvent;C、Replace the TestUserControl.ascx reference in TestPage.aspx with the following declaration. uc:TestUserControl ID="testControl" runat="server" OnMyEvent="TestMethod"/D、Replace the TestUserControl.ascx reference in TestPage.aspx with the following declaration. uc:TestUserControl ID="testControl" runat="server" MyEvent="TestMethod"/

You define the following regular expression of currency values: regex tx = new regex("^-?/d+(/./d{2})?$") You are required to write code that will be used to find whether a string in the variable named Bill matches the regular expression or not. You are also required to use this code as the expression in a conditional statement and need to know which code segment to use. What should you do?()A、The tx.Matches(Bill)B、The tx.Equals(Bill)C、The tx.Match(Bill)D、The tx.IsMatch(Bill)

单选题You create a method that runs by using the credentials of the end user. You need to use  Microsoft Windows groups to authorize the user. You must add a code segment that identifies whether a user is in the local group named Clerk.Which code segment should you use?()A AB BC CD D

单选题You are developing a class library that will open the network socket connections to computers on the network. You will deploy the class library to the global assembly cache and grant it full trust. You write the following code to ensure usage of the socket connections.  SocketPermission permission =   new SocketPermission(PermissionState.Unrestricted);  permission.Assert(); Some of the applications that use the class library might not have the necessary permissions to open the network socket connections.You need to cancel the assertion. Which code segment should you use?()ACodeAccessPermission.RevertAssert();BCodeAccessPermission.RevertDeny();Cpermission.Deny();Dpermission.PermitOnly();

单选题You define the following regular expression of currency values: regex tx = new regex("^-?/d+(/./d{2})?$") You are required to write code that will be used to find whether a string in the variable named Bill matches the regular expression or not. You are also required to use this code as the expression in a conditional statement and need to know which code segment to use. What should you do?()AThe tx.Matches(Bill)BThe tx.Equals(Bill)CThe tx.Match(Bill)DThe tx.IsMatch(Bill)

单选题You are creating an ASP.NET Web site. The site is configured to use Membership and Role management providers. You need to check whether the currently logged-on user is a member of a role namedAdministrators. Which code segment should you use?()Abool isMember = Roles.GetUsersInRole(Administrators).Any()Bbool isMember = Membership.ValidateUser(User.Identity.Name, Administrators)Cbool isMember = Roles.GetRolesForUser(Administrators).Any()Dbool isMember = User.IsInRole(Administrators)

单选题You use Microsoft .Net Framework 4 to create a Windows Form application. You created a new application, you then wrote the code below: Thread.CurrentThread.CurrentUICulture = Thread.CurrentThread.CurrentCulture Which of the following options are TRUE? ()AThe user interface will make use of the currently configured culture settings in the Control Panel at present.BThe user interface will make use of new culture settings.CThe user interface will make use of the culture settings that were installed with the operating system.

单选题You are creating a Windows Communication Foundation (WCF) service. You need to ensure that the service is compatible with ASP.NET to make use of the session state. Which binding should you use?()ANetTcpContextBindingBBasicHttpContextBindingCNetTcpBindingDNetMsmqBinding

单选题You are creating a Windows Forms application by using the .NET Framework 3.5. The application requires a thread that accepts a single integer parameter.    You write the following code segment (Line numbers are included for reference only.) Thread myThread = new Thread(new ParameterizedThreadStart(DoWork)) ;  myThread.Start(100); You need to declare the method signature of the DoWork method.   Which method signature should you use?()Apublic void DoWork();Bpublic void DoWork(int nCounter);Cpublic void DoWork(object oCounter);Dpublic void DoWork(Delegate oCounter);

单选题You are developing an application that runs by using the credentials of the end user. Only users who are members of the Administrator group get permission to run the application. You write the following security code to protect sensitive data within the application.bool isAdmin=false;  WindowsBuiltInRole role=WindowsBuiltInRole.Administrator; ......  if(!isAdmin)          throw new Exception("User not permitted");   You need to add a code segment to this security code to ensure that the application throws an exception if a user is not a member of the Administrator group. Which code segment should you use?()A AB BC CD D

单选题You are creating a Windows Communication Foundation (WCF) service that uses claims-based authorization. The following code retrieves the correct claim set.var claims = ServiceSecurityContext.Current.AuthorizationContext.ClaimSets[0];You need to validate that the requesting client application has included a valid DNS value in the claim. Which code segment should you use to retrieve the claim for validation?()Aclaims.FindClaims(ClaimTypes.Dns, Rights.PossessProperty).FirstOrDefault();Bclaims.FindClaims(ClaimTypes.Dns, Rights.Identity).FirstOrDefault();Cclaims.ContainsClaim(Claim.CreateDnsClaim(ClaimTypes.Dns));Dclaims.Equals(ClaimTypes.Dns);

单选题You work as an application developer at Certkiller .com. You are currently in the process of creating a class that stores data about Certkiller .com’s customers. Certkiller .com customers are assigned unique identifiers and various characteristics that may include aliases, shipping instructions, and sales comments. These characteristics can change in both size and data type. You start by defining the Customer class as shown below: public class Customer { private int custID; private ArrayList attributes; public int CustomerID { get {return custID;} } public Customer (int CustomerID) { this.custID = CustomerID; this.attributes = new ArrayList (); } public void AddAttribute (object att) {  attributes.Add (att); } } You have to create the FindAttribute method for locating attributes in Customer objects no matter what the data type is.You need to ensure that the FindAttributemethod returns the attribute if found,and you also need to ensure type-safety when returning the attribute.What should you do?()A Use the following code to declare the FindAttribute method: public T FindAttribute (T att) {//Find attribute and return the value }B Use the following code to declare the FindAttribute method: public object FindAttribute (object att) {//Find attribute and return the value }C Use the following code to declare the FindAttribute method: public T FindAttribute  (T att) {//Find attribute and return the value }D Use the following code to declare the FindAttribute method: public string FindAttribute (string att) {//Find attribute and return the value }

多选题You work as an application developer at Certkiller .com. You have recently created an application domain for Certkiller .com. A few weeks later you are asked to retrieve information from this application domain, which is the current application domain. What can you do to achieve this objective?()AUse the following code: AppDomain appInfo = ApplicationDomain.Current;BUse the following code: AppDomain appInfo = AppDomain.CurrentDomain ();CUse the following code: AppDomain appInfo = Thread.GetDomain ();DUse the following code: AppDomain appInfo = MainThread.GetDomain ();