欢迎来到求知题库网 求知题库官网
logo
全部科目 > 微软认证考试 > MCTS > MCTS(70-528)

单项选择题

You have an SQL query that takes one minute to execute. You use the following code segment to execute the SQL query asynchronously.IAsyncResult ar = cmd.BeginExecuteReader();You need to execute a method named Do Work() 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.while(ar.AsyncWaitHandle==null){DoWork();}dr=cmd.EndExecuteReader(ar);
    B.while(!ar.IsCompleted){DoWork();}dr=cmd.EndExecuteReader(ar);
    C.while(Thread.CurrentThread.ThreadState==ThreadState.Running){DoWork();}dr=cmd.EndExecuteReader(ar);
    D.while(!ar.AsyncWaitHandle.WaitOne()){DoWork();}dr=cmd.EndExecuteReader(ar);

点击查看答案&解析

相关考题

微信小程序免费搜题
微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题

微信扫一扫,加关注免费搜题