Timers(70-536)

Discussion in 'MCTS' started by blade, Feb 23, 2008.

  1. blade

    blade Guest

    Hey,
    This question is not clear for me.Does they mean that callback is never
    invoked or only once?
    What is correct ansewer?

    You are developing a Windows Service application by using the .NET Framework
    2.0. You write the following code in your class:
    Dim myTimer As Timer = New Timer(statusDelegate, Nothing, 1000, 250)
    The delegate statusDelegate is already correctly defined in your class. You
    must modify the code so that the callback method is not invoked periodically.
    Which code segment should you use?
    A. Dim myTimer As Timer = _
    New Timer(statusDelegate, Nothing, Timeout.Infinite, 0)
    B. Dim myTimer As Timer = _
    New Timer(statusDelegate, Nothing, 1000, Timeout.Infinite)
    C. Dim myTimer As Timer = _
    New Timer(statusDelegate, Nothing, 0, 32767)
    D. Dim myTimer As Timer = _
    New Timer(statusDelegate, Nothing, Timeout.Infinite, 250)
     
    blade, Feb 23, 2008
    #1
    1. Advertising

  2. "blade" <> wrote in message
    news::

    > Hey,
    > This question is not clear for me.Does they mean that callback is never
    > invoked or only once?
    > What is correct ansewer?
    >
    > You are developing a Windows Service application by using the .NET Framework
    > 2.0. You write the following code in your class:
    > Dim myTimer As Timer = New Timer(statusDelegate, Nothing, 1000, 250)
    > The delegate statusDelegate is already correctly defined in your class. You
    > must modify the code so that the callback method is not invoked periodically.
    > Which code segment should you use?
    > A. Dim myTimer As Timer = _
    > New Timer(statusDelegate, Nothing, Timeout.Infinite, 0)
    > B. Dim myTimer As Timer = _
    > New Timer(statusDelegate, Nothing, 1000, Timeout.Infinite)
    > C. Dim myTimer As Timer = _
    > New Timer(statusDelegate, Nothing, 0, 32767)
    > D. Dim myTimer As Timer = _
    > New Timer(statusDelegate, Nothing, Timeout.Infinite, 250)


    Where are you getting this question?

    --
    Michael D. Alligood, MCITP, MCTS, MCSA, MCDST
    The I.T. Classroom - http://www.theitclassroom.com/
    CertGuard, Inc. - http://www.certguard.com/
     
    Michael D. Alligood [CertGuard, Inc.], Feb 23, 2008
    #2
    1. Advertising

  3. Blade - I would interpret "periodically" to mean "over and over again", i.e.
    repetitively. Not invoking it at all defeats the purpose of a Timer, so I
    would go with "B". But I see your point, because "A" is technically correct
    because in the strictest sense the timer will not periodically invoke - in
    fact it does not invoke it at all.


    "blade" wrote:

    > Hey,
    > This question is not clear for me.Does they mean that callback is never
    > invoked or only once?
    > What is correct ansewer?
    >
    > You are developing a Windows Service application by using the .NET Framework
    > 2.0. You write the following code in your class:
    > Dim myTimer As Timer = New Timer(statusDelegate, Nothing, 1000, 250)
    > The delegate statusDelegate is already correctly defined in your class. You
    > must modify the code so that the callback method is not invoked periodically.
    > Which code segment should you use?
    > A. Dim myTimer As Timer = _
    > New Timer(statusDelegate, Nothing, Timeout.Infinite, 0)
    > B. Dim myTimer As Timer = _
    > New Timer(statusDelegate, Nothing, 1000, Timeout.Infinite)
    > C. Dim myTimer As Timer = _
    > New Timer(statusDelegate, Nothing, 0, 32767)
    > D. Dim myTimer As Timer = _
    > New Timer(statusDelegate, Nothing, Timeout.Infinite, 250)
    >
     
    Vijay Jagdale, Mar 12, 2008
    #3
  4. blade

    xr280xr Guest

    I agree, my impression was that they want it to invoke once and only once.

    "Vijay Jagdale" wrote:

    > Blade - I would interpret "periodically" to mean "over and over again", i.e.
    > repetitively. Not invoking it at all defeats the purpose of a Timer, so I
    > would go with "B". But I see your point, because "A" is technically correct
    > because in the strictest sense the timer will not periodically invoke - in
    > fact it does not invoke it at all.
    >
    >
    > "blade" wrote:
    >
    > > Hey,
    > > This question is not clear for me.Does they mean that callback is never
    > > invoked or only once?
    > > What is correct ansewer?
    > >
    > > You are developing a Windows Service application by using the .NET Framework
    > > 2.0. You write the following code in your class:
    > > Dim myTimer As Timer = New Timer(statusDelegate, Nothing, 1000, 250)
    > > The delegate statusDelegate is already correctly defined in your class. You
    > > must modify the code so that the callback method is not invoked periodically.
    > > Which code segment should you use?
    > > A. Dim myTimer As Timer = _
    > > New Timer(statusDelegate, Nothing, Timeout.Infinite, 0)
    > > B. Dim myTimer As Timer = _
    > > New Timer(statusDelegate, Nothing, 1000, Timeout.Infinite)
    > > C. Dim myTimer As Timer = _
    > > New Timer(statusDelegate, Nothing, 0, 32767)
    > > D. Dim myTimer As Timer = _
    > > New Timer(statusDelegate, Nothing, Timeout.Infinite, 250)
    > >
     
    xr280xr, Apr 3, 2008
    #4
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. R Siffredi

    Timers spf

    R Siffredi, Oct 28, 2005, in forum: Cisco
    Replies:
    1
    Views:
    699
    Everton
    Oct 31, 2005
  2. MayB

    Why do Old-Timers

    MayB, Nov 9, 2003, in forum: Computer Support
    Replies:
    83
    Views:
    2,082
    trout
    Nov 12, 2003
  3. Harvey Colwell

    Only Old Timers need to apply.

    Harvey Colwell, Nov 3, 2006, in forum: MCSE
    Replies:
    18
    Views:
    1,281
  4. =?iso-8859-1?Q?mark=5Fdigital=A9?=

    OT-where's all the old timers?

    =?iso-8859-1?Q?mark=5Fdigital=A9?=, Jul 16, 2006, in forum: Digital Photography
    Replies:
    23
    Views:
    771
  5. Jack B. Pollack

    Calling all old-timers DOS2, BASIC v1 question

    Jack B. Pollack, Dec 12, 2006, in forum: Computer Support
    Replies:
    8
    Views:
    566
    Jack B. Pollack
    Dec 13, 2006
Loading...

Share This Page