70-483 ms certifikat dump c#

Upload: matovilkica

Post on 19-Feb-2018

227 views

Category:

Documents


0 download

TRANSCRIPT

  • 7/24/2019 70-483 MS Certifikat Dump C#

    1/135

    QUESTION 1

    Youhavealotofitemsthatneedtobeprocessed.Foreachitem,youneedtoperformacomplex

    calculation.Whichtechniqueshouldyouuse?

    A.

    YoucreateaTaskforeachitemandthenwaituntilalltasksarefinished.

    B.

    YouuseParallel.Fortoprocessallitemsconcurrently.

    C.

    Youuseasync/awaittoprocessallitemsconcurrently.

    D.

    YouaddallitemstoaBlockingCollectionandprocessthemonathreadcreatedbythe

    Threadclass.

    Correct

    Answer:

    B

    QUESTION 2

    Youarecreatingacomplexquerythatdoesntrequireanyparticularorderandyouwanttorunit

    inparallel.

    Which

    method

    should

    you

    use?

    A.

    AsParallel

    B.

    AsSequential

    C.

    AsOrdered

    D.

    WithDegreeOfParallelism

    Correct

    Answer:

    A

    QUESTION 3

    YouareworkingonanASP.NETapplicationthatretrievessomedatafromanotherwebserverand

    thenwrites

    the

    response

    to

    the

    database.

    Should

    you

    use

    async/await?

    A.

    No,bothoperationsdependonexternalfactors.Youneedtowaitbeforetheyare

    finished.

    B.

    No,inaserverapplicationyoudonthavetouseasync/await.Itsonlyforresponsiveness

    ontheclient.

    C.

    Yes,thiswillfreeyourthreadtoserveotherrequestswhilewaitingfortheI/Oto

    complete.

    D.

    Yes,thisputyourthreadtosleepwhilewaitingforI/OsothatitdoesntuseanyCPU.

    Correct

    Answer:

    C

  • 7/24/2019 70-483 MS Certifikat Dump C#

    2/135

    QUESTION 5

    Youneedtoimplementcancellationforalongrunningtask.Whichobjectdoyoupasstothe

    task?

    A.

    CancellationTokenSource

    B.

    CancellationToken

    C.

    BooleanisCancelledvariable

    D.

    Volatile

    Correct

    Answer:

    B

    QUESTION 6

    Youareimplementingastatemachineinamultithreadedclass.Youneedtocheckwhatthe

    currentstate

    is

    and

    change

    it

    to

    the

    new

    one

    on

    each

    step.

    Which

    method

    do

    you

    use?

    A.

    Volatile.Write(refcurrentState)

    B.

    Interlocked.CompareExchange(refcurrentState,refnewState,expectedState)

    C.

    Interlocked.Exchange(refcurrentState,newState)

    D.

    Interlocked.Decrement(refnewState)

    Correct

    Answer:

    B

    QUESTION 7

    Youneedtoiterateoveracollectioninwhichyouknowthenumberofitems.Youneedtoremove

    certainitemsfromthecollection.Whichstatementdoyouuse?

    A.

    switch

    B.

    foreach

    C.

    for

    D.

    goto

    Correct

    Answer:

    C

    QUESTION 8

    Youhave

    alot

    of

    checks

    in

    your

    application

    for

    null

    values.

    If

    avalue

    is

    not

    null,

    you

    want

    to

    call

    a

    methodonit.Youwanttosimplifyyourcode.Whichtechniquedoyouuse?

    A.

    for

    B.

    Conditionaloperator

    C.

    Nullcoalescingoperator

    D.

    Theshortcircuitingbehavioroftheandoperator

    Correct

    Answer:

    D

    QUESTION

    9

  • 7/24/2019 70-483 MS Certifikat Dump C#

    3/135

    Youareprocessingsomedatafromoverthenetwork.YouuseaHasNextandReadmethodto

    retrievethedata.Youneedtorunsomecodeoneachitem.Whatdoyouuse?

    A.

    for

    B.

    foraech

    C.

    while

    D.

    dowhile

    Correct

    Answer:

    C

    QUESTION 10

    Youhaveaprivatemethodinyourclassandyouwanttomakeinvocationofthemethodpossible

    bycertaincallers.Whatdoyoudo?

    A.

    Makethemethodpublic.

    B.

    Usean

    event

    so

    outside

    users

    can

    be

    notified

    when

    the

    method

    is

    executed.

    C.

    Useamethodthatreturnsadelegatetoauthorizedcallers.

    D.

    Declaretheprivatemethodasalambda.

    Correct

    Answer:

    C

    QUESTION 1

    Youarecreatinganewcollectiontypeandyouwanttomakesuretheelementsinitcanbeeasily

    accessed.Whatshouldyouaddtothetype?

    A.

    Constructor

    B.

    Indexerproperty

    C.

    Generictypeparameter

    D.

    Staticproperty

    Correct

    Answer:

    B

    QUESTION 2

    Youarecreatingagenericclassthatshouldworkonlywithreferencetypes.Whichtypeconstraint

    shouldyouadd?

    A.

    whereT:class

    B.

    whereT:struct

    C.

    whereT:new()

    D.

    whereT:IDisposable

    Correct

    Answer:

    A

    QUESTION 3

  • 7/24/2019 70-483 MS Certifikat Dump C#

    4/135

    Youpassastructvariableintoamethodasanargument.Themethodchangesthevariable;

    however,whenthemethodreturns,thevariablehasnotchanged.Whathappened?

    A.

    Thevariablewasnotinitializedbeforeitwaspassedin.

    B.

    Avaluetypecannotbechangedinsideamethod.

    C.

    Passingavaluetypemakesacopyofthedata.Theoriginalwasntchanged.

    D.

    Themethoddidntreturnthechanges.

    Correct

    Answer:

    C

    QUESTION 4

    YouarecreatingacustomDistanceclass.YouwanttoeasetheconversionfromyourDistance

    classtoadouble.Whatshouldyouadd?

    A.

    Nothing;thisisalreadypossible.

    B.

    Animplicitcastoperator.

    C.

    An

    explicit

    cast

    operator.

    D.

    AstaticParsemethod.

    Correct

    Answer:

    B

    QUESTION 5

    Youwanttodeterminewhetherthevalueofanobjectreferenceisderivedfromaparticulartype.

    WhichC#languagefeaturecanyouuse?(Chooseallthatapply.)

    A.

    Anasoperator

    B.

    Animplicitcast

    C.

    Anis

    operator

    D.

    Adynamickeyword

    Correct

    Answer:

    AC

  • 7/24/2019 70-483 MS Certifikat Dump C#

    5/135

    QUESTION 7

    Whataccessmodifiershouldyouusetomakesurethatamethodinaclasscanonlybeaccessed

    insidethesameassemblybyderivedtypes?

    A.

    Makethe

    class

    public

    and

    its

    members

    public.

    B.

    Maketheclasspublicanditsmembersprotected.

    C.

    Maketheclassinternalanditsmembersinternal.

    D.

    Maketheclassinternalanditsmembersprotected.

    Correct

    Answer:

    D

    QUESTION 8

    Youneedtoexposesomedatafromaclass.Thedatacanbereadbyothertypesbutcanbe

    changedonly

    by

    derived

    types.

    What

    should

    you

    use?

    A.

    Aprotectedfield

    B.

    Apublicpropertywithaprotectedsetmodifier

    C.

    Aprotectedproperty

    D.

    Aprotectedpropertywithapublicgetmodifier

    Correct

    Answer:

    B

    QUESTION

    9Youhaveaclassthatimplementstwointerfacesthatbothhaveamethodwiththesamename.

    InterfaceIAshouldbethedefaultimplementation.InterfaceIBshouldbeusedonlyinspecial

    situations.Howdoyouimplementthoseinterfaces?

    A.

    ImplementIAimplicitlyandIBexplicitly.

    B.

    ImplementbothIAandIBexplicitly.

    C.

    ImplementbothIAandIBimplicitly.

    D.

    ImplementIAexplicitlyandIBimplicitly.

    Correct

    Answer:

    A

    QUESTION 10

    Youwanttocreateahierarchyoftypesbecauseyouhavesomeimplementationcodeyouwant

    tosharebetweenalltypes.Youalsohavesomemethodsignaturesyouwanttoshare.What

    shouldyouuse?

    A.

    Aninterface

    B.

    Aclasswithvirtualmethods

  • 7/24/2019 70-483 MS Certifikat Dump C#

    6/135

    C.

    Anabstractclass

    D.

    Asealedclass

    Correct

    Answer:

    C

    QUESTION 11

    Youwanttocreateatypethatcanbeeasilysorted.Whichinterfaceshouldyouimplement?

    A.

    IEnumerable

    B.

    IComparable

    C.

    IDisposable

    D.

    IUnknown

    Correct

    Answer:

    B

    QUESTION

    12

    Youwanttoinheritfromanexistingclassandaddsomebehaviortoamethod.Whichstepsdo

    youhavetotake?(Chooseallthatapply.)

    A.

    Usetheabstractkeywordonthebasetype.

    B.

    Usethevirtualkeywordonthebasemethod.

    C.

    Usethenewkeywordonthederivedmethod.

    D.

    Usetheoverridekeywordonthederivedmethod.

    Correct

    Answer:

    BD

    QUESTION

    13

    Youwanttoreadthevalueofaprivatefieldonaclass.WhichBindingFlagsdoyouneed?(Choose

    allthatapply.)

    A.

    Instance

    B.

    DeclaredOnly

    C.

    Static

    D.

    NonPublic

    Correct

    Answer:

    AD

  • 7/24/2019 70-483 MS Certifikat Dump C#

    7/135

    QUESTION 15

    Youwanttocreateadelegatethatcanfilteralistofstringsonaspecificvalue.Whichtypeshould

    youuse?

    A.

    Action.

    B.

    Func.

    C.

    Func.

    D.

    Func.

    Correct

    Answer:

    C

    QUESTION 16

    Youareabouttoexecuteapieceofcodethatisperformancesensitive.Youareafraidthata

    garbagecollectionwilloccurduringtheexecutionofthiscode.Whichmethodshouldyoucall

    beforeexecutingyourcode?

    A.

    GC.RemoveMemoryPressure()

    B.

    GC.SuppressFinalize()

    C.

    GC.Collect()

    D.

    GC.WaitForPendingFinalizers()

    Correct

    Answer:

    C

    QUESTION 17

    AnobjectthatisimplementingIDisposableispassedtoyourclassasanargument.Shouldyou

    wraptheelementinausingstatement?

    A.

    Yes,otherwiseamemoryleakcouldhappen.

  • 7/24/2019 70-483 MS Certifikat Dump C#

    8/135

    B.

    No,youshouldcallCloseontheobject.

    C.

    No,youshoulduseatry/finallystatementandcallDisposeyourself.

    D.

    No,thecallingmethodshoulduseausingstatement.

    Correct

    Answer:

    D

    QUESTION 18

    Yourapplicationisusingalotofmemory.Whichsolutionshouldyouuse?

    A.

    TurnallreferencesintoWeakReferences.

    B.

    Setallreferencestonullwhenyouaredonewiththem.

    C.

    Useacachingalgorithmtodecidewhichobjectscanbefreed.

    D.

    UseabackgroundthreadtocallGC.Collect()onascheduledinterval.

    Correct

    Answer:

    C

    QUESTION

    19

    YouwanttodisplayonlythedateportionofaDateTimeaccordingtotheFrenchculture.What

    methodshouldyouuse?

    A.

    dt.ToString(newCultureInfo(frFR))

    B.

    dt.ToString(M,newCultureInfo(frFR));

    C.

    dt.ToString(d);

    D.

    dt.ToString(d,newCultureInfo(frFR));

    Correct

    Answer:

    D

    QUESTION 20

    Youwantyourtypetobeabletobeconvertedfromstring.Whichinterfaceshouldyou

    implement?

    A.

    IFormattable

    B.

    IFormatProvider

    C.

    IComparable

    D.

    IConvertible

    Correct

    Answer:

    A

    QUESTION 1

    AuserneedstoenteraDateTimeinatextfield.Youneedtoparsethevalueincode.Which

    methoddoyouuse?

    A.

    DateTime.Parse

    B.

    DateTime.TryParse

    C.

    Convert.ToDateTime

    D.

    Regex.Match.

    Correct

    Answer:

    B

  • 7/24/2019 70-483 MS Certifikat Dump C#

    9/135

    QUESTION 2

    Youareworkingonaglobalizedwebapplication.Youneedtoparseatextfieldwheretheuser

    entersanamountofmoney.Whichmethoddoyouuse?

    A.

    int.TryParse(value,NumberStyles.Currency,

    UICulture);

    B.

    decimal.TryParse(value,NumberStyles.Currency,UICulture);

    C.

    decimal.TryParse(value,ServerCulture);

    D.

    decimal.TryParse(value)

    Correct

    Answer:

    B

    QUESTION 3

    YouneedtovalidateanXMLfile.Whatdoyouuse?

    A.

    JavaScriptSerializer

    B.

    RegEx

    C.

    StringBuilder

    D.

    XSD

    Correct

    Answer:

    D

    QUESTION 4

    Boband

    Alice

    are

    using

    an

    asymmetric

    algorithm

    to

    exchange

    data.

    Which

    key

    should

    they

    send

    totheotherpartytomakethispossible?

    A.

    BobsendsAlicehisprivatekey,andAlicesendsBobherpublickey.

    B.

    BobsendsAlicehisprivatekey,andAlicesendsBobherprivatekey.

    C. BobsendsAlicehispublickey,andAlicesendsBobherpublickey.

    D.

    BobsendsAlicehispublickey,andAlicesendsBobherprivatekey.

    Correct

    Answer:

    C

  • 7/24/2019 70-483 MS Certifikat Dump C#

    10/135

    QUESTION 6

    Youneedtosendsensitivedatatoanotherpartyandyouwanttomakesurethatnoonetampers

    withthedata.Whichmethoddoyouuse?(Chooseallthatapply.)

    A.

    X509Certificate2.SignHash

    B.

    RSACryptoServiceProvider.Encrypt

    C.

    UnicodeEncoding.GetBytes

    D.

    Marshal.ZeroFreeBSTR

    Correct

    Answer:

    AC

    QUESTION 7

    Youarebuildingastrongnamedassemblyandyouwanttoreferencearegularassemblytoreuse

    somecodeyoubuilt.Whatdoyouhavetodo?

    A.

    YoufirstneedtoputtheassemblyintheGAC.

    B.

    Nothing.Referencinganotherassemblytousesomecodeisalwayspossible.

    C.

    Youneedtosigntheotherassemblybeforeusingit.

    D.

    Youneedtousethepublickeytokenoftheotherassemblytoreferenceit.

    Correct

    Answer:

    C

    QUESTION 8

    Youarebuildinganassemblythatwillbeusedbyacoupleofserverapplications.Youwantto

    maketheupdateprocessofthisassemblyassmoothaspossible.Whichstepsshouldyoutake?

    A.

    CreateaWinMDMetadatafile.

    B.

    DeploytheassemblytotheGAC.

    C.

    AddanassemblyBindingsectiontoeachclientapplicationthatpointstothelocationof

    theassembly.

    D.

    Stronglynametheassembly.

    Correct

    Answer:

    B

  • 7/24/2019 70-483 MS Certifikat Dump C#

    11/135

    QUESTION 9

    Youwanttodeployanassemblytoasharedlocationontheintranet.Whichstepsshouldyou

    take?(Chooseallthatapply.)

    A.

    Stronglynametheassembly.

    B.

    Usethe

    codebase

    configuration

    element

    in

    the

    applications

    that

    use

    the

    assembly.

    C.

    DeploytheassemblytotheGAC.

    D.

    UsetheassemblyBindingconfigurationelementwiththeprobingoption.

    Correct

    Answer:

    AB

    QUESTION 10

    Youarereadytodeployyourcodetoaproductionserver.Whichconfigurationdoyoudeploy?

    A.

    Debugconfiguration

    B.

    Releaseconfiguration

    C.

    CustomconfigurationwithPDBfiles

    D.

    Releaseconfigurationbuiltwiththe/debug:fullcompilerflag

    Correct

    Answer:

    B

    QUESTION 1

    Youarecreatinganewfiletostoresomelogdata.Eachtimeanewlogentryisnecessary,you

    writeastringtothefile.Whichmethoddoyouuse?

    A.

    File.CreateText

    B.

    FileInfo.Create

    C.

    File.Create

    D.

    File.AppendText

    Correct

    Answer:

    D

    QUESTION 2

    Youhavebuiltacomplexcalculationalgorithm.Ittakesquitesometimetocompleteandyou

    wantto

    make

    sure

    that

    your

    application

    remains

    responsive.

    What

    do

    you

    do?

    A.

    Useasync/await.

    B.

    Runthecodesynchronously.

    C. UseTask.Run.

    D.

    UseaBackgroundWorker.

    Correct

    Answer:

    C

    QUESTION 3

    Youare

    writing

    an

    application

    that

    will

    be

    deployed

    to

    Western

    countries.

    It

    outputs

    user

    activity

    toatextfile.Whichencodingshouldyouuse?

  • 7/24/2019 70-483 MS Certifikat Dump C#

    12/135

    A.

    UTF8

    B.

    UTF7

    C.

    ASCII

    D.

    UTF32

    Correct

    Answer:

    A

    QUESTION 5

    Youareplanningtobuildanapplicationthatwilluseanobjectorienteddesign.Itwillbeusedby

    multipleusersatthesametime.Whichtechnologyshouldyouuse?

    A.

    XMLfiles

    B.

    EntityFramework

    C.

    ADO.NET

    D.

    Webservice

    Correct

    Answer:

    B

    QUESTION 6

    YouneedtoprocessalargenumberofXMLfilesinascheduledservicetoextractsomedata.

    Whichclassshouldyouuse?

    A.

    XmlReader

    B.

    XmlDocument

    C.

    XmlWriter

    D.

    FileStream

    Correct

    Answer:

    A

    QUESTION 7

    Youhavealistofdates.Youwanttofilterthedatestothecurrentyearandthenselectthe

    highestdate.

    Which

    query

    do

    you

    use?

    (Choose

    all

    that

    apply.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    13/135

    A.

    DateTimeresult=dates.Where(d=>d==DateTime.Now).OrderBy(d=>d).First();

    B.

    DateTimeresult=dates.Where(d=>d.Year==DateTime.Now.Year).OrderByDescending(d

    =>d).FirstOrDefault();

    C.

    DateTimeresult=dates.Where(d=>d.Year==DateTime.Now.Year).OrderByDescending(d

    =>d).First();

    D.

    DateTimeresult

    =dates.Where(d

    =>

    d.Year

    ==

    DateTime.Now.Year).OrderByDescending(d

    =>d).Single();

    Correct

    Answer:

    BD

    QUESTION 8

    YouaretryingtouseaLINQquery,butyouaregettingacompileerrorthattheWheremethod

    cannotbefound.Whatshouldyoudo?(Chooseallthatapply.)

    A.

    AddausingSystem.Linqstatement.

    B.

    Checkthat

    you

    are

    using

    atype

    that

    implements

    IEnumerable.

    C.

    Changeyourqueryfromquerytomethodsyntax.

    D.

    Changethetypeofyourquerytovar.

    Correct

    Answer:

    AB

    QUESTION 9

    YouareusingthefollowingLINQtoEntitiesquery:

    varquery=frompinmyContext.Products

    wherep.Price

  • 7/24/2019 70-483 MS Certifikat Dump C#

    14/135

    QUESTION

    YouaredevelopinganapplicationthatincludesaclassnamedOrder.Theapplicationwillstorea

    collectionofOrderobjects.

    The

    collection

    must

    meet

    the

    following

    requirements:

    Usestronglytypedmembers.

    ProcessOrderobjectsinfirstinfirstoutorder.

    StorevaluesforeachOrderobject.

    Usezerobasedindices.

    Youneedtouseacollectiontypethatmeetstherequirements.

    Whichcollectiontypeshouldyouuse?

    A.

    Queue

    B. SortedList

    C. LinkedList

    D. HashTable

    E. Array

    Correct

    Answer:

    A

    QUESTION

    2

    Youaredevelopinganapplication.Theapplicationcallsamethodthatreturnsanarrayofintegers

    namedemployeeIds.YoudefineanintegervariablenamedemployeeIdToRemoveandassigna

    valuetoit.YoudeclareanarraynamedfilteredEmployeeIds.

    Youhavethefollowingrequirements:

    RemoveduplicateintegersfromtheemployeeIdsarray.

    Sortthearrayinorderfromthehighestvaluetothelowestvalue.

    RemovetheintegervaluestoredintheemployeeIdToRemovevariablefromtheemployeeIds

    array.

    YouneedtocreateaLINQquerytomeettherequirements.

    Whichcodesegmentshouldyouuse?

  • 7/24/2019 70-483 MS Certifikat Dump C#

    15/135

    Correct

    Answer:

    C

    QUESTION

    3

    Youaredevelopinganapplicationthatincludesthefollowingcodesegment.(Linenumbersare

    includedforreferenceonly.)

    TheGetAnimals()methodmustmeetthefollowingrequirements:

    ConnecttoaMicrosoftSQLServerdatabase.

    CreateAnimalobjectsandpopulatethemwithdatafromthedatabase.

    ReturnasequenceofpopulatedAnimalobjects.pan>

    Youneedtomeettherequirements.

    Whichtwoactionsshouldyouperform?(Eachcorrectanswerpresentspartofthesolution.

    Choosetwo.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    16/135

    A.

    Insertthefollowingcodesegment at line 16:

    while(sqlDataReader.NextResult())

    B.

    Insertthefollowingcodesegment at line 13:

    sqlConnection.BeginTransaction();

    C.

    Insertthefollowingcodesegment at line 13:

    sqlConnection.Open();

    D.

    Insertthefollowingcodesegment at line 16:

    while(sqlDataReader.Read())

    E.

    insertthefollowingcodesegment at line 16:

    while(sqlDataReader.GetValues())

    Correct

    Answer:

    CD

    QUESTION

    4

    DRAG

    DROP

    YouaredevelopingacustomcollectionnamedLoanCollectionforaclassnamedLoanclass.You

    needtoensurethatyoucanprocesseachLoanobjectintheLoanCollectioncollectionbyusinga

    foreachloop.Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriate

    codesegmentstothecorrectlocationsintheanswerarea.Eachcodesegmentmaybeusedonce,

    morethanonce,ornotatall.Youmayneedtodragthesplitbarbetweenpanesorscrolltoview

    content.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    17/135

    Correct

    Answer:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    18/135

    le="cursor:auto;margin:0cm0cm0pt;lineheight:normal;textautospace:;msolayoutgrid

    align:none"align="left">

  • 7/24/2019 70-483 MS Certifikat Dump C#

    19/135

    QUESTION

    5

    YouaredevelopinganapplicationthatusestheMicrosoftADO.NETEntityFrameworktoretrieve

    orderinformationfromaMicrosoftSQLServerdatabase.Theapplicationincludesthefollowing

    code.(Linenumbersareincludedforreferenceonly.)

    color="#000000">Theapplicationmustmeetthefollowingrequirements:

    ReturnonlyordersthathaveanOrderDatevalueotherthannull.

    ReturnonlyordersthatwereplacedintheyearspecifiedintheOrderDatepropertyorinalater

    year.

    Youneedtoensurethattheapplicationmeetstherequirements.

    Whichcodesegmentshouldyouinsertatline08?

    A.

    Whereorder.OrderDate.Value

    != null && order.OrderDate.Value.Year >

    =year

    B. Whereorder.OrderDate.Value== null && order.OrderDate.Value.Year==year

    C. Whereorder.OrderDate.HasValue && order.OrderDate.Value.Year = = year

    D. Whereorder.OrderDate.Value.Year = = year

    Correct

    Answer:

    A

    Explanation:

    *FortherequirementtouseanOrderDatevalueotherthannulluse:

    OrderDate.Value!=null

    *Forthe

    requirement

    to

    use

    an

    OrderDate

    value

    for

    this

    year

    or

    alater

    year

    use:

    OrderDate.Value>=year

    QUESTION

    6

    DRAGDROP

    YouaredevelopinganapplicationbyusingC#.Theapplicationincludesanarrayofdecimalvalues

    namedloanAmounts.YouaredevelopingaLINQquerytoreturnthevalues

    fromthearray.

    Thequerymustreturndecimalvaluesthatareevenlydivisiblebytwo.Thevaluesmustbesorted

    fromthe

    lowest

    value

    to

    the

    highest

    value.

  • 7/24/2019 70-483 MS Certifikat Dump C#

    20/135

    Youneedtoensurethatthequerycorrectlyreturnsthedecimalvalues.

    Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriatecodesegmentsto

    thecorrectlocationsintheanswerarea.Eachcodesegmentmaybeusedonce,morethanonce,

    ornotatall.Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)

    Correct

    Answer:

    QUESTION

    7

    Youaredevelopinganapplication.TheapplicationincludesamethodnamedReadFilethat

    readsdata

    from

    afile.

    TheReadFile()methodmustmeetthefollowingrequirements:

    Itmustnotmakechangestothedatafile.

    Itmustallowotherprocessestoaccessthedatafile.

    Itmustnotthrowanexceptioniftheapplicationattemptstoopenadatafilethatdoesnot

    exist.

    YouneedtoimplementtheReadFile()method.

    Whichcode

    segment

    should

    you

    use?

  • 7/24/2019 70-483 MS Certifikat Dump C#

    21/135

    Correct

    Answer:

    B

    QUESTION

    8

    AnapplicationreceivesJSONdatainthefollowingformat:

    Theapplicationincludesthefollowingcodesegment.(Linenumbersareincludedforreference

    only.)

    YouneedtoensurethattheConvertToName()methodreturnstheJSONinputstringasaName

    object.

    Whichcodesegmentshouldyouinsertatline10?

    A. Returnser.ConvertToType(json);

    B. Returnser.DeserializeObject(json);

    C. Returnser.Deserialize(json);

    D. Return(Name)ser.Serialize(json);

    Correct

    Answer:

    C

  • 7/24/2019 70-483 MS Certifikat Dump C#

    22/135

    QUESTION9

    DRAGDROP

    AnapplicationserializesanddeserializesXMLfromstreams.TheXMLstreamsareinthefollowing

    format:

    TheapplicationreadstheXMLstreamsbyusingaDataContractSerializerobjectthatisdeclaredby

    thefollowingcodesegment:

    varser=newDataContractSerializer(typeof(Name));

    YouneedtoensurethattheapplicationpreservestheelementorderingasprovidedintheXML

    stream.

    Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriateattributestothe

    correctlocationsintheanswerareaEachattributemaybeusedonce,morethanonce,ornotat

    all.Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)

    Correct

    Answer:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    23/135

    QUESTION

    Youaredevelopinganapplication.TheapplicationconvertsaLocationobjecttoastringbyusing

    amethodnamedWriteObject.TheWriteObject()methodacceptstwoparameters,aLocation

    objectandanXmlObjectSerializerobject.

    Theapplication

    includes

    the

    following

    code.

    (Line

    numbers

    are

    included

    for

    reference

    only.)

    YouneedtoserializetheLocationobjectasaJSONobject.

    Which

    code

    segment

    should

    you

    insert

    at

    line

    20?

    A. tyle="fontfamily: ; msofontkerning: 0pt; msonoproof: yes">New DataContractSerializer(typeof(Location)

    B. NewXmlSerializer(typeof(Location))

    C. NewNetDataContractSenalizer()

    D. NewDataContractJsonSerializer(typeof(Location))

    Correct

    Answer:

    D

    Explanation:

    TheDataContractJsonSerializerclassserializesobjectstotheJavaScriptObjectNotation(JSON)

    anddeserializes

    JSON

    data

    to

    objects.

    Use

    the

    DataContractJsonSerializer

    class

    to

    serialize

    instancesofatypeintoaJSONdocumentandtodeserializeaJSONdocumentintoaninstanceof

    atype.

    QUESTION

    AnapplicationincludesaclassnamedPerson.ThePersonclassincludesamethodnamed

    GetData.YouneedtoensurethattheGetData()methodcanbeusedonlybythePersonclassora

    classderivedfromthePersonclass.WhichaccessmodifiershouldyouusefortheGetData()

    method?

    A. Internal

  • 7/24/2019 70-483 MS Certifikat Dump C#

    24/135

    B. Protected

    C. Private

    D. Protectedinternal

    E. Public

    Correct

    Answer:

    B

    Explanation:

    Theprotectedkeywordisamemberaccessmodifier.Aprotectedmemberisaccessiblewithinits

    classandbyderivedclassinstances.

    QUESTION

    2

    YouaredevelopinganapplicationbyusingC#.Theapplicationincludesthefollowingcode

    segment.(Linenumbersareincludedforreferenceonly.)

    TheDoWork()methodmustnotthrowanyexceptionswhenconvertingtheobjobjecttothe

    IDataContainerinterfaceorwhenaccessingtheDataproperty.

    Youneedtomeettherequirements.Whichcodesegmentshouldyouinsertatline07?

    A. vardataContainer =(IDataContainer)obj;

    B. dynamicdataContainer=obj;

    C. vardataContainer =objisIDataContainer;

    D. vardataContainer =objasIDataContainer;

    Correct

    Answer:

    D

    QUESTION

    3

    Youarecreatinganapplicationthatmanagesinformationaboutzooanimals.Theapplication

    includesaclassnamedAnimalandamethodnamedSave.

    TheSave()methodmustbestronglytyped.ItmustallowonlytypesinheritedfromtheAnimal

    classthatusesaconstructorthatacceptsnoparameters.

    Youneed

    to

    implement

    the

    Save()

    method.

  • 7/24/2019 70-483 MS Certifikat Dump C#

    25/135

    Whichcodesegmentshouldyouuse?

    Correct

    Answer:

    C

    QUESTION

    4

    DRAGDROP

    YouaredevelopingaclassnamedExtensionMethods.Youneedtoensurethatthe

    ExtensionMethodsclass

    implements

    the

    IsUrl()

    method

    on

    string

    objects.

    How

    should

    you

    completetherelevantcode?(Toanswer,dragtheappropriatecodesegmentstothecorrect

    locationsintheanswerarea.Eachcodesegmentmaybeusedonce,morethanonce,ornotatall.

    Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    26/135

    Correct

    Answer:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    27/135

    QUESTION

    5

    Youaredevelopinganapplication.TheapplicationincludesclassesnamedEmployeeandPerson

    andaninterfacenamedIPerson.

    TheEmployeeclassmustmeetthefollowingrequirements:

    ItmusteitherinheritfromthePersonclassorimplementtheIPersoninterface.

    Itmustbeinheritablebyotherclassesintheapplication.

    YouneedtoensurethattheEmployeeclassmeetstherequirements.

    Whichtwocodesegmentscanyouusetoachievethisgoal?(Eachcorrectanswerpresentsa

    completesolution.Choosetwo.)

    Correct

    Answer:

    BD

    QUESTION

    6

    Youaredevelopinganapplicationthatwillconvertdataintomultipleoutputformats.

    Theapplicationincludesthefollowingcode.(Linenumbersareincludedforreferenceonly.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    28/135

    Youaredevelopingacodesegmentthatwillproducetabdelimitedoutput.Alloutputroutines

    implementthefollowinginterface:

    YouneedtominimizethecompletiontimeoftheGetOutput()method.Whichcodesegment

    shouldyouinsertatline06?

    Correct

    Answer:

    B

    QUESTION

    7

    YouaredevelopinganapplicationbyusingC#.Theapplicationincludesanobjectthatperformsa

    longrunningprocess.Youneedtoensurethatthegarbagecollectordoesnotreleasetheobjects

    resourcesuntiltheprocesscompletes.Whichgarbagecollectormethodshouldyouuse?

    A. ReRegisterForFinalize()

    B. SuppressFinalize()

    C. Collect()

    D.

    WaitForFullGCApproach()

    Correct

    Answer:

    B

  • 7/24/2019 70-483 MS Certifikat Dump C#

    29/135

    QUESTION 8

    YouarecreatingaclassnamedEmployee.Theclassexposesastringpropertynamed

    EmployeeType.ThefollowingcodesegmentdefinestheEmployeeclass.(Linenumbersare

    includedforreferenceonly.)

    TheEmployeeTypepropertyvaluemustbeaccessedandmodifiedonlybycodewithinthe

    EmployeeclassorwithinaclassderivedfromtheEmployeeclass.

    Youneed

    to

    ensure

    that

    the

    implementation

    of

    the

    EmployeeType

    property

    meets

    the

    requirements.

    Whichtwoactionsshouldyouperform?(Eachc

    orrectanswerrepresentspartofthecompletesolution.)

    A.

    Replaceline05withthefollowing code segment:

    protectedget;

    B.

    Replaceline06withthefollowing code segment:

    privateset;

    C.

    Replaceline

    03

    with

    the

    following code segment:

    publicstringEmployeeType

    D.

    Replaceline05withthefollowing code segment:

    privateget;

    E.

    Replaceline03withthefollowing code segment:

    protectedstringEmployeeType

    F.

    Replaceline06withthefollowing code segment:

    protectedset;

    Correct

    Answer:

    E

    QUESTION

    9

    YouareimplementingamethodnamedCalculatethatperformsconversionsbetweenvaluetypes

    andreferencetypes.Thefollowingcodesegmentimplementsthemethod.

    (Linenumbersareincludedforreferenceonly.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    30/135

    Youneedtoensurethattheapplicationdoesnotthrowexceptionsoninvalidconversions.

    Whichcodesegmentshouldyouinsertatline04?

    A. intbalance=(int) (float)amountRef;

    B. intbalance=(int)amountRef;

    C. intbalance=amountRef;

    D. intbalance=(int) (double)amountRef;

    Correct

    Answer:

    B

    QUESTION

    2

    YouarecreatingaconsoleapplicationbyusingC#.Youneedtoaccesstheapplicationassembly.

    Whichcodesegmentshouldyouuse?

    A. Assembly.GetAssembly(this);

    B. this.GetType();

    C. Assembly.Load();

    D. Assembly.GetExecutingAssembly();

    Correct

    Answer:

    D

    QUESTION

    2

    HOTSPOT

    Youare

    implementing

    alibrary

    method

    that

    accepts

    acharacter

    parameter

    and

    returns

    astring.

    If

    thelookupsucceeds,themethodmustreturnthecorrespondingstringvalue.Ifthelookupfails,

    themethodmustreturnthevalueinvalidchoice.Youneedtoimplementthelookupalgorithm.

    Howshouldyoucompletetherelevantcode?(Toanswer,selectthecorrectkeywordineach

    dropdownlistintheanswerarea.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    31/135

    Correct

    Answer:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    32/135

    QUESTION

    22

    YouusetheTask.Run()methodtolaunchalongrunningdataprocessingoperation.Thedata

    processingoperationoftenfailsintimesofheavynetworkcongestion.Ifthedataprocessing

    operationfails,asecondoperationmustcleanupanyresultsofthefirstoperation.Youneedto

    ensure

    that

    the

    second

    operation

    is

    invoked

    only

    if

    the

    data

    processing

    operation

    throws

    an

    unhandledexception.Whatshouldyoudo?

    A.

    ign="top"width="708">

    CreateaTaskCompletionSourceobjectandcalltheTrySetException()methodoftheobject.

    B. CreateataskbycallingtheTask.ContinueWith() method.

    C. ExaminetheTask.Statusproperty immediately after the call to the Task.Run()method.

    D. CreateataskinsidetheexistingTask.Run() method by using the AttachedToParentoption.

    Correct

    Answer:

    B

  • 7/24/2019 70-483 MS Certifikat Dump C#

    33/135

    QUESTION

    23

    Youaremodifyinganapplicationthatprocessesleases.ThefollowingcodedefinestheLease

    class.(Linenumbersareincludedforreferenceonly.)

    Leasesare

    restricted

    to

    amaximum

    term

    of

    5years.

    The

    application

    must

    send

    anotification

    messageifaleaserequestexceeds5years.

    Youneedtoimplementthenotificationmechanism.Whichtwoactionsshouldyouperform?

    (Eachcorrectanswerpresentspartofthesolution.Choosetwo.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    34/135

    Correct

    Answer:

    AB

    QUESTION

    24

    Youaredevelopinganapplicationthatusesstructuredexceptionhandling.Theapplication

    includesaclassnamedExceptionLogger.

    TheExceptionLoggerclassimplementsamethodnamedLogExceptionbyusingthefollowingcode

    segment:

    publicstaticvoidLogException(Exceptionex)

    Youhavethefollowingrequirements:

    Logall

    exceptions

    by

    using

    the

    LogException()

    method

    of

    the

    ExceptionLogger

    class.

    Rethrowtheoriginalexception,includingtheentireexceptionstack.

    Youneedtomeettherequirements. Whichcodesegmentshouldyouuse?

  • 7/24/2019 70-483 MS Certifikat Dump C#

    35/135

    Correct

    Answer:

    A

    QUESTION

    25

    YouaredevelopinganapplicationthatincludesaclassnamedUserTracker.Theapplication

    includesthe

    following

    code

    segment.

    (Line

    numbers

    are

    included

    for

    reference

    only.)

    YouneedtoaddausertotheUserTrackerinstance.

    Whatshouldyoudo?

  • 7/24/2019 70-483 MS Certifikat Dump C#

    36/135

    Correct

    Answer:

    D

    QUESTION

    26

    DRAGDROP

    Youdevelopanapplicationthatdisplaysinformationfromlogfileswhenerrorsoccur.The

    applicationwillprompttheusertocreateanerrorreportthatsendsdetailsabouttheerror

    andthesessiontotheadministrator.

    Whenauseropensalogfilebyusingtheapplication,theapplicationthrowsanexceptionand

    closes.

    Theapplicationmustpreservetheoriginalstacktraceinformationwhenanexceptionoccurs

    duringthis

    process.

  • 7/24/2019 70-483 MS Certifikat Dump C#

    37/135

    Youneedtoimplementthemethodthatreadsthelogfiles.

    Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriatecodesegmentsto

    thecorrectlocationsintheanswerarea.Eachcodesegmentmaybeusedonce,morethanonce,

    ornotatall.Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)

    Correct

    Answer:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    38/135

    QUESTION

    27

    DRAGDROP

    YouaredevelopinganapplicationthatincludesaclassnamedKiosk.TheKioskclassincludesa

    staticpropertynamedCatalog.TheKioskclassisdefinedbythefollowingcodesegment.(Line

    numbersareincludedforreferenceonly.)

    Youhavethefollowingrequirements:

    Initializethe_catalogfieldtoaCataloginstance.

    Initializethe

    _catalog

    field

    only

    once.

  • 7/24/2019 70-483 MS Certifikat Dump C#

    39/135

    Ensurethattheapplicationcodeacquiresalockonlywhenthe_catalogobjectmustbe

    instantiated.

    Youneedtomeettherequirements.

    Whichthree

    code

    segments

    should

    you

    insert

    in

    sequence

    at

    line

    09?

    (To

    answer,

    move

    the

    appropriatecodesegmentsfromthelistofcodesegmentstotheanswerareaandarrangethem

    inthecorrectorder.)

    Correct

    Answer:

    QUESTION

    28

    DRAGDROP

    YouaredevelopinganapplicationthatwillincludeamethodnamedGetData.TheGetData()

    methodwillretrieveseverallinesofdatafromawebservicebyusingaSystem.IO.StreamReader

    object.

    Youhave

    the

    following

    requirements:

    TheGetData()methodmustreturnastringvaluethatcontainsthefirstlineoftheresponse

    fromthewebservice.

    TheapplicationmustremainresponsivewhiletheGetData()methodruns.

    YouneedtoimplementtheGetData()method.

    Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriateobjectstothe

    correctlocationsintheanswerarea.Eachobjectmaybeusedonce,morethanonce,ornotatall.

    Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    40/135

    Correct

    Answer:

    QUESTION

    29

    YouareaddingapublicmethodnamedUpdateScoretoapublicclassnamedScoreCard.

    Thecoderegionthatupdatesthescorefieldmustmeetthefollowingrequirements:

    Itmust

    be

    accessed

    by

    only

    one

    thread

    at

    atime.

    Itmustnotbevulnerabletoadeadlocksituation.

    YouneedtoimplementtheUpdateScore()method.

    Whatshouldyoudo?

  • 7/24/2019 70-483 MS Certifikat Dump C#

    41/135

    Correct

    Answer:

    B

    QUESTION

    3

    DRAGDROP

    Youaredevelopinganapplicationthatimplementsasetofcustomexceptiontypes.Youdeclare

    thecustomexceptiontypesbyusingthefollowingcodesegments:

    TheapplicationincludesafunctionnamedDoWorkthatthrows.NETFrameworkexceptionsand

    customexceptions.

    Theapplicationcontainsonlythefollowingloggingmethods:

    Theapplicationmustmeetthefollowingrequirements:

    WhenAdventureWorksValidationExceptionexceptionsarecaught,logtheinformationbyusing

    thestaticvoidLog(AdventureWorksValidationExceptionex)method.

    WhenAdventureWorksDbExceptionorotherAdventureWorksExceptionexceptionsarecaught,

    logtheinformationbyusingthestaticvoidIoq(AdventureWorksExceptionex)method.

    Youneedtomeettherequirements.

  • 7/24/2019 70-483 MS Certifikat Dump C#

    42/135

    Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriatecodesegmentsto

    thecorrectlocationsintheanswerarea.Eachcodesegmentmaybeusedonce,morethanonce,

    ornotatall.Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)

    Correct

    Answer:

    QUESTION

    3

    YouaredevelopingaC#applicationthathasarequirementtovalidatesomestringinputdataby

    usingtheRegexclass.

    TheapplicationincludesamethodnamedContainsHyperlink.TheContainsHyperlink()method

    willverifythepresenceofaURIandsurroundingmarkup.

  • 7/24/2019 70-483 MS Certifikat Dump C#

    43/135

    ThefollowingcodesegmentdefinestheContainsHyperlink()method.(Linenumbersareincluded

    forreferenceonly.)

    Theexpressionpatternsusedforeachvalidationfunctionareconstant.

    YouneedtoensurethattheexpressionsyntaxisevaluatedonlyoncewhentheRegexobjectis

    initiallyinstantiated.

    Whichcodesegmentshouldyouinsertatline04?

    Correct

    Answer:

    D

    QUESTION

    32

    YouaredevelopinganapplicationbyusingC#.

    Youhavethefollowingrequirements:

    Support32bitand64bitsystemconfigurations.

    Includepreprocessordirectivesthatarespecifictothesystemconfiguration.

    Deployanapplicationversionthatincludesbothsystemconfigurationstotesters.

    Ensurethatstacktracesincludeaccuratelinenumbers.

    Youneedtoconfiguretheprojecttoavoidchangingindividualconfigurationsettingseverytime

    youdeploytheapplicationtotesters.

    Whichtwoactionsshouldyouperform?(Eachcorrectanswerpresentspartofthesolution.

    Choosetwo.)

    A. Updatetheplatformtargetandconditional compilation symbols for eachapplicationconfiguration.

    B. Createtwoapplicationconfigurations based on the default Release configuration.

    C. Optimizetheapplicationthrough address rebasing in the 64bit configuration.

    D.

    Createtwo

    application

    configurations based on the default Debug configuration.

    Correct

    Answer:

    BD

  • 7/24/2019 70-483 MS Certifikat Dump C#

    44/135

    QUESTION33

    YouaredevelopingamethodnamedCreateCountersthatwillcreateperformancecountersforan

    application.

    Themethodincludesthefollowingcode.(Linenumbersareincludedforreferenceonly.)

    YouneedtoensurethatCounter1isavailableforuseinWindowsPerformanceMonitor

    (PerfMon).

    Whichcode

    segment

    should

    you

    insert

    at

    line

    16?

    A. CounterType=PerformanccCounterType.RawBase

    B. CounterType=PerformanceCounterType.AverageBase

    C. CounterType=PerformanceCounterType.SampleBase

    D. CounterType=PerformanceCounterType.CounterMultiBase

    Correct

    Answer:

    C

    QUESTION

    34

    Youaredevelopinganapplicationthatwilltransmitlargeamountsofdatabetweenaclient

    computerandaserver.Youneedtoensurethevalidityofthedatabyusingacryptographic

    hashingalgorithm.Whichalgorithmshouldyouuse?

    A. HMACSHA256

    B. RNGCryptoServiceProvider

    C. DES

    D. Aes

    Correct

    Answer:

    A

  • 7/24/2019 70-483 MS Certifikat Dump C#

    45/135

    QUESTION35

    DRAGDROP

    Youaretestinganapplication.TheapplicationincludesmethodsnamedCalculateInterestand

    LogLine.TheCalculateInterest()methodcalculatesloaninterest.TheLogLine()methodsends

    diagnosticmessagestoaconsolewindow.

    Youhavethefollowingrequirements:

    TheCalculateInterest()methodmustrunforallbuildconfigurations.

    TheLogLine()methodmustbecalledonlyfordebugbuilds.

    Youneedtoensurethatthemethodsruncorrectly.

    Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriatecodesegmentsto

    thecorrectlocationsintheanswerarea.Eachcodesegmentmaybeusedonce,morethanonce,

    ornotatall.Youmayneedtodragthesplitbarbetweenpanesor

    scrollto

    view

    content.)

    Correct

    Answer:

    QUESTION

    36

    Youaredevelopinganassemblythatwillbeusedbymultipleapplications.Youneedtoinstallthe

    assemblyintheGlobalAssemblyCache(GAC).Whichtwoactionscanyouperformtoachievethis

    goal?(Eachcorrectanswerpresentsacompletesolution.Choosetwo.)

    A. UsetheAssembly Registrationtool (regasm.exe) to register the assemblyandtocopythe assembly to the G

    B. UsetheStrongNametool(sn.exe) to copy the assembly into the GAC.

    C.

    UseMicrosoft

    Register

    Server

    (regsvr32.exe) to add the assembly to the

    GAC.

    D. UsetheGlobalAssemblyCachetool (gacutil.exe) to add the assembly totheGAC.

  • 7/24/2019 70-483 MS Certifikat Dump C#

    46/135

    E. UseWindowsInstaller2.0toadd the assembly to the GAC.

    Correct

    Answer:

    BD

    QUESTION

    37

    Youaredebugginganapplicationthatcalculatesloaninterest.Theapplicationincludesthe

    followingcode.(Linenumbersareincludedforreferenceonly.)

    Youneed

    to

    ensure

    that

    the

    debugger

    breaks

    execution

    within

    the

    CalculateInterest()

    method

    whentheloanAmountvariableislessthanorequaltozeroinallbuildsoftheapplication.

    Whatshouldyoudo?

    A.

    Insertthefollowingcodesegment at line 03:

    Trace.Assert(loanAmount>0);

    B.

    Insertthefollowingcodesegment at line 03:

    Debug.Assert(loanAmount>0);

    C.

    Insertthefollowingcodesegment at line 05:

    Debug.Write(loanAmount>0);

    D.

    Insertthefollowingcodesegment at line 05:

    Trace.Write(loanAmount>0);

    Correct

    Answer:

    B

    QUESTION

    38

    Youaredevelopinganapplicationthatacceptstheinputofdatesfromtheuser.

    Usersenter

    the

    date

    in

    their

    local

    format.

    The

    date

    entered

    by

    the

    user

    is

    stored

    in

    astring

    variablenamedinputDate.ThevaliddatevaluemustbeplacedinaDateTimevariablenamed

    validatedDate.

    YouneedtovalidatetheentereddateandconvertittoCoordinatedUniversalTime(UTC).The

    codemustnotcauseanexceptiontobethrown.

    Whichcodesegmentshouldyouuse?

  • 7/24/2019 70-483 MS Certifikat Dump C#

    47/135

    Correct

    Answer:

    A

    Explanation:

    AdjustToUniversalparsessand,ifnecessary,convertsittoUTC.

    Note:

    TheDateTime.TryParsemethodconvertsthespecifiedstringrepresentationofadateandtimeto

    itsDateTimeequivalentusingthespecifiedculturespecificformatinformationandformatting

    style,andreturnsavaluethatindicateswhethertheconversionsucceeded.

    QUESTION

    39

    DRAGDROP

    YouaredevelopinganapplicationbyusingC#.Theapplicationwillprocessseveralobjectspersecond.Youneedtocreateaperformancecountertoanalyzetheobjectprocessing.Whichthree

    actionsshouldyouperforminsequence?(Toanswer,movetheappropriateactionsfromthelist

    ofactionstotheanswerareaandarrangetheminthecorrectorder.)

    Correct

    Answer:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    48/135

    QUESTION

    4

    YouaredevelopinganapplicationbyusingC#.Youprovideapublickeytothedevelopmentteam

    duringdevelopment.Youneedtospecifythattheassemblyisnotfullysignedwhenitisbuilt.

    Whichtwoassemblyattributesshouldyouincludeinthesourcecode?(Eachcorrectanswer

    presentspartofthesolution.Choosetwo.)

    A. AssemblyKeyNameAttribute

    B.

    ObfuscateAssemblyAttribute

    C. AssemblyDelaySignAttribute

    D. AssemblyKeyFileAttribute

    Correct

    Answer:

    CD

    Explanation:

    *AssemblyDelaySignAttribute

    Specifiesthattheassemblyisnotfullysignedwhencreated.

    *ThefollowingcodeexampleshowstheuseoftheAssemblyDelaySignAttributeattributewiththe

    AssemblyKeyFileAttribute.

    usingSystem;

    usingSystem.Reflection;

    [assembly:AssemblyKeyFileAttribute(TestPublicKey.snk)]

    [assembly:AssemblyDelaySignAttribute(true)]

    namespaceDelaySign

    {

    publicclassTest{}

    }

  • 7/24/2019 70-483 MS Certifikat Dump C#

    49/135

    QUESTION

    4

    DRAGDROP

    YouaredevelopinganapplicationthatincludesaclassnamedWarehouse.TheWarehouseclass

    includesastaticpropertynamedInventory TheWarehouseclassisdefinedbythefollowingcode

    segment.(Linenumbersareincludedforreferenceonly.)

    Youhavethefollowingrequirements:

    Initializethe_inventoryfieldtoanInventoryinstance.

    Initializethe_inventoryfieldonlyonce.

    Ensurethattheapplicationcodeacquiresalockonlywhenthe_inventoryobjectmustbe

    instantiated.

    Youneedtomeettherequirements.

    Whichthreecodesegmentsshouldyouinsertinsequenceatline09?(Toanswer,movethe

    appropriatecode

    segments

    from

    the

    list

    of

    code

    segments

    to

    the

    answer

    area

    and

    arrange

    them

    inthecorrectorder.)

    Correct

    Answer:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    50/135

    QUESTION42

    YouareaddingapublicmethodnamedUpdateGradetoapublicclassnamedReportCard.

    Thecoderegionthatupdatesthegradefieldmustmeetthefollowingrequirements:

    Itmust

    be

    accessed

    by

    only

    one

    thread

    at

    atime.

    Itmustnotbevulnerabletoadeadlocksituation.

    YouneedtoimplementtheUpdateGrade()method.

    Whatshouldyoudo?

    Correct

    Answer:

    A

    QUESTION

    43

    YouaredevelopinganapplicationthatincludesaclassnamedBookTrackerfortrackinglibrary

    books.Theapplicationincludesthefollowingcodesegment.(Linenumbersareincludedfor

    referenceonly.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    51/135

    YouneedtoaddausertotheBookTrackerinstance.Whatshouldyoudo?

    Correct

    Answer:

    B

  • 7/24/2019 70-483 MS Certifikat Dump C#

    52/135

    QUESTION

    44

    DRAGDROP

    YouareimplementingamethodthatcreatesaninstanceofaclassnamedUser.TheUserclass

    containsapubliceventnamedRenamed.ThefollowingcodesegmentdefinestheRenamed

    event:

    PubliceventEventHandlerRenamed;

    YouneedtocreateaneventhandlerfortheRenamedeventbyusingalambdaexpression.

    Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriatecodesegmentsto

    thecorrectlocationsintheanswerarea.Eachcodesegmentmaybeusedonce,morethanonce,

    ornotatall.Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)

    Correct

    Answer:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    53/135

    QUESTION

    45

    YouarecreatingaconsoleapplicationbyusingC#.Youneedtoaccesstheassemblyfoundinthe

    filenamedcar.dll.Whichcodesegmentshouldyouuse?

    A. Assembly.Load();

    B. Assembly.GetExecutingAssembly();

    C.

    this.GetType();

    D. Assembly.LoadFile(car.dll);

    Correct

    Answer:

    D

    QUESTION

    46

    YouaredevelopinganapplicationbyusingC#.Theapplicationincludesanobjectthatperformsa

    longrunningprocess.Youneedtoensurethatthegarbagecollectordoesnotreleasetheobjects

    resourcesuntiltheprocesscompletes.Whichgarbagecollectormethodshouldyouuse?

    A.

    WaitForFullGCComplete()

    B. WaitForFullGCApproach()

    C. KeepAlive()

    D. WaitForPendingFinalizers()

    Correct

    Answer:

    C

    Explanation:

    TheGC.KeepAlivemethodreferencesthespecifiedobject,whichmakesitineligibleforg

    arbagecollectionfromthestartofthecurrentroutinetothepointwherethismethodiscalled.

    ThepurposeoftheKeepAlivemethodistoensuretheexistenceofareferencetoanobjectthatis

    at

    risk

    of

    being

    prematurely

    reclaimed

    by

    the

    garbage

    collector.

    The

    KeepAlive

    method

    performs

  • 7/24/2019 70-483 MS Certifikat Dump C#

    54/135

    nooperationandproducesnosideeffectsotherthanextendingthelifetimeoftheobjectpassed

    inasaparameter.

    QUESTION

    47

    Anapplication

    includes

    aclass

    named

    Person.

    The

    Person

    class

    includes

    amethod

    named

    GetData.YouneedtoensurethattheGetData()methodcanbeusedonlybythePersonclassand

    notbyanyclassderivedfromthePersonclass.Whichaccessmodifiershouldyouuseforthe

    GetData()method?

    A. Public

    B. Protectedinternal

    C. Internal

    D. Private

    E. Protected

    Correct

    Answer:

    D

    Explanation:

    TheGetData()methodshouldbeprivate.ItwouldthenonlybevisiblewithinthePersonclass.

    QUESTION

    48

    Youarecreatinganapplicationthatmanagesinformationaboutyourcompanysproducts.The

    applicationincludesaclassnamedProductandamethodnamedSave.

    TheSave()

    method

    must

    be

    strongly

    typed.

    It

    must

    allow

    only

    types

    inherited

    from

    the

    Product

    classthatuseaconstructorthatacceptsnoparameters.

    YouneedtoimplementtheSave()method.Whichcodesegmentshouldyouuse?

    Correct

    Answer:

    D

  • 7/24/2019 70-483 MS Certifikat Dump C#

    55/135

    QUESTION

    49

    DRAGDROP

    YouaredevelopinganapplicationbyusingC#.TheapplicationwilloutputthetextstringFirst

    LinefollowedbythetextstringSecondLine.

    Youneed

    to

    ensure

    that

    an

    empty

    line

    separates

    the

    text

    strings.

    Whichfourcodesegmentsshouldyouuseinsequence?(Toanswer,movetheappropriatecode

    segmentstotheanswerareaandarrangetheminthecorrectorder.)

    Correct

    Answer:

    QUESTION

    5

    Youaredevelopinganapplication.TheapplicationincludesclassesnamedMammalandAnimal

    andaninterfacenamedIAnimal.

    TheMammalclassmustmeetthefollowingrequirements:

    ItmusteitherinheritfromtheAnimalclassorimplementtheIAnimalinterface.

    Itmustbeinheritablebyotherclassesintheapplication.

    YouneedtoensurethattheMammalclassmeetstherequirements.

    Whichtwocodesegmentscanyouusetoachievethisgoal?(Eachcorrectanswerpresentsa

    completesolution.Choosetwo.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    56/135

    Correct

    Answer:

    AC

    QUESTION

    5

    DRAGDROP

    YouaredevelopingaclassnamedExtensionMethods.

    Youneed

    to

    ensure

    that

    the

    ExtensionMethods

    class

    implements

    the

    IsEmail()

    extension

    method

    onstringobjects.

    Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriatecodesegmentsto

    thecorrectlocationsintheanswerarea.Eachcodesegmentmaybeusedonce,morethanonce,

    ornotatall.Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)

    Correct

    Answer:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    57/135

    QUESTION

    52

    YouaredevelopinganapplicationbyusingC#.Theapplicationincludesthefollowingcode

    segment.(Linenumbersareincludedforreferenceonly.)

    TheDoWork()methodmustthrowanInvalidCastExceptionexceptioniftheobjobjectisnotof

    typeIDataContainerwhenaccessingtheDataproperty.

    Youneedtomeettherequirements.

    Whichcodesegmentshouldyouinsertatline07?

    A. vardataContainer =(IDataContainer) obj;

    B. vardataContainer =objasIDataContamer;

    C. vardataContainer =objisIDataContainer;

    D.

    dynamic

    dataContainer

    =

    obj;

    Correct

    Answer:

    A

    QUESTION

    53

    AnapplicationreceivesJSONdatainthefollowingformat:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    58/135

    Theapplicationincludesthefollowingcodesegment.(Linenumbersareincludedforreference

    only.)

    YouneedtoensurethattheConvertToName()methodreturnstheJSONinputstringasaName

    object.

    Whichcode

    segment

    should

    you

    insert

    at

    line

    10?

    A. Returnser.Desenalize(json,typeof(Name));

    B. Returnser.ConvertToType(json);

    C. Returnser.Deserialize(json);

    D. Returnser.ConvertToType(json, typeof (Name));

    Correct

    Answer:

    C

    QUESTION

    54

    Youaredevelopinganapplicationthatincludesthefollowingcodesegment.(Linenumbersare

    includedforreferenceonly.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    59/135

    TheGetCustomers()methodmustmeetthefollowingrequirements:

    ConnecttoaMicrosoftSQLServerdatabase.

    PopulateCustomerobjectswithdatafromthedatabase.

    Returnan

    IEnumerable

    collection

    that

    contains

    the

    populated

    Customer

    objects.

    Youneedtomeettherequirements.

    Whichtwoactionsshouldyouperform?(Eachcorrectanswerpresentspartofthesolution.

    Choosetwo.)

    A.

    Insertthefollowingcodesegment at line 17:

    while(sqlDataReader.GetValues())

    B.

    Insertthefollowingcodesegment at line 14:

    sqlConnection.Open();

    C.

    Insertthefollowingcodesegment at line 14:

    sqlConnection.BeginTransaction();

    D.

    Insertthefollowingcodesegment at line 17:

    while(sqlDataReader.Read())

    E.

    Insertthefollowingcodesegment at line 17:

    while(sqlDataReader.NextResult())

    Correct

    Answer:

    BD

    Explanation:

    sqlConecction.Openin

    line

    14

    TheSqlConnection.Openmethodopensadatabaseconnectionwiththepropertysettings

    specifiedbytheConnectionString.

    while(SqlDataReader.Read())inline17

    Readthenextlineuntilendoffile.

    TheSqlDataReader.ReadmethodAdvancestheSqlDataReadertothenextrecord.Thevalueis

    trueiftherearemorerows;otherwisefalse.

    QUESTION

    55

    DRAGDROP

    YouaredevelopinganapplicationthatincludesaclassnamedCustomer.

    TheapplicationwilloutputtheCustomerclassasastructuredXMLdocumentbyusingthe

    followingcodesegment:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    60/135

    YouneedtoensurethattheCustomerclasswillserializetoXML.

    Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriatecodesegmentsto

    thecorrectlocationsintheanswerarea.Eachcodesegmentmaybeusedonce,morethanonce,

    ornotatall.Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)

    Correct

    Answer:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    61/135

    QUESTION

    56

    AnapplicationwilluploaddatabyusingHTMLformbasedencoding.Theapplicationusesa

    methodnamedSendMessage.

    TheSendMessage()methodincludesthefollowingcode.(Linenumbersareincludedforreference

    only.)

    ThereceivingURLacceptsparametersasformencodedvalues.

    YouneedtosendthevaluesintAandintBasformencodedvaluesnamedaandb,respectively.

    Whichcodesegmentshouldyouinsertatline04?

  • 7/24/2019 70-483 MS Certifikat Dump C#

    62/135

    Correct

    Answer:

    D

    QUESTION

    57

    Youaredevelopinganapplication.TheapplicationconvertsaLocationobjecttoastringbyusing

    amethod

    named

    WriteObject.

    TheWriteObject()methodacceptstwoparameters,aLocationobjectandanXmlObjectSerializer

    object.

    Theapplicationincludesthefollowingcode.(Linenumbersareincludedforreferenceonly.)

    YouneedtoserializetheLocationobjectasXML.

    Whichcodesegmentshouldyouinsertatline20?

    A. NewXmlSerializer(typeof(Location))

    B. NewNetDataContractSerializer()

    C. NewBataContractJsonSerializer(typeof (Location) )

    D. NewDataContractSerializer(typeof(Location))

    Correct

    Answer:

    D

  • 7/24/2019 70-483 MS Certifikat Dump C#

    63/135

    QUESTION

    58

    YouaredevelopinganapplicationthatincludesaclassnamedOrder.Theapplicationwillstorea

    collectionofOrderobjects.

    Thecollectionmustmeetthefollowingrequirements:

    Internallystoreakeyandavalueforeachcollectionitem.

    Provideobjectstoiteratorsinascendingorderbasedonthekey.

    Ensurethatitemareaccessiblebyzerobasedindexorbykey.

    Youneedtouseacollectiontypethatmeetstherequirements.

    tyle="cursor:auto;margin:0cm0cm0pt;lineheight:normal;textautospace:;msolayoutgrid

    align:none"align="left">

    Whichcollectiontypeshouldyouuse?

    A. LinkedList

    B. Queue

    C. Array

    D. HashTable

    E. SortedList

    Correct

    Answer:

    E

    Explanation:

    http://msdn.microsoft.com/enus/library/system.collections.sortedlist.aspx

    QUESTION

    59

    Youaredevelopinganapplicationthatincludesthefollowingcodesegment.(Linenumbersare

    includedforreferenceonly.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    64/135

    Youneedtoensurethattheapplicationacceptsonlyintegerinputandpromptstheusereach

    timenonintegerinputisentered.

    Whichcodesegmentshouldyouaddatline19?

    A. If(!int.TryParse(sLine,outnumber))

    B.

    If((number

    =Int32.Parse(sLine)) = = Single.NaN)

    C. If((number=int.Parse(sLine))>Int32.MaxValue)

    D. If(Int32.TryParse(sLine,outnumber))

    Correct

    Answer:

    A

    QUESTION

    6

    Youaredebugginganapplicationthatcalculatesloaninterest.Theapplicationincludesthe

    followingcode.(Linenumbersareincludedforreferenceonly.)

    Youhavethefollowingrequirements:

    ThedebuggermustbreakexecutionwithintheCalculatelnterest()methodwhenthe

    loanAmountvariable

    is

    less

    than

    or

    equal

    to

    zero.

  • 7/24/2019 70-483 MS Certifikat Dump C#

    65/135

    Thereleaseversionofthecodemustnotbeimpactedbyanychanges. Youneedtomeetthe

    requirements.

    Whatshouldyoudo?

    A.Insert

    the

    following

    code

    segment at tine 05:

    Debug.Write(loanAmount>0);

    B.

    Insertthefollowingcodesegment at line 05:

    Trace.Write(loanAmount>0);

    C.

    Insertthefollowingcodesegment at line 03:

    Debug.Assert(loanAmount>0);

    D.

    Insertthefollowingcodesegment at line 03:

    Trace.Assert(loanAmount>0);

    Correct

    Answer:

    C

    QUESTION

    6

    Youaredevelopinganapplicationthatwillprocessorders.Thedebugandreleaseversionsofthe

    applicationwilldisplaydifferentlogoimages.

    Youneedtoensurethatthecorrectimagepathissetbasedonthebuildconfiguration.

    Whichcodesegmentshouldyouuse?

    Correct

    Answer:

    C

  • 7/24/2019 70-483 MS Certifikat Dump C#

    66/135

    QUESTION

    62

    Youaretestinganapplication.TheapplicationincludesmethodsnamedCalculateInterestaid

    LogLine.TheCalculateInterest()methodcalculatesloaninterest.TheLogLine()methodsends

    diagnosticmessagestoaconsolewindow.

    Thefollowing

    code

    implements

    the

    methods.

    (Line

    numbers

    are

    included

    for

    reference

    only.)

    Youhavethefollowingrequirements:

    TheCalculatelnterest()methodmustrunforallbuildconfigurations.

    TheLogLine()methodmustrunonlyfordebugbuilds.

    Youneedtoensurethatthemethodsruncorrectly.

    Whataretwopossiblewaystoachievethisgoal?(Eachcorrectanswerpresentsacomplete

    solution.Choosetwo.)

    A.

    Insertthefollowingcodesegment at line 01:

    #regionDEBUG

    Insertthefollowingcodesegmentatline10:

    #endregion

    B.

    Insertthefollowingcodesegment at line 10:

    [Conditional(DEBUG)]

    C.

    Insertthefollowingcodesegment at line 05:

    #regionDEBUG

    Insertthefollowingcodesegmentatline07:

    #endregion

    D.

    Insertthefollowingcodesegment at line 01:

    #ifDE30G

    Insertthefollowingcodesegmentatline10:

    #endif

    E.

    Insertthefollowingcodesegment at line 01:

    [Conditional(DEBUG)]

    F.

    Insertthefollowingcodesegment at line 05:

    #ifDEBUG

    Insertthe

    following

    code

    segment

    at

    line

    07:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    67/135

    #endif

    G.

    Insertthefollowingcodesegment at line 10:

    [Conditional(RELEASE)]

    Correct

    Answer:

    BF

    QUESTION

    63

    YouaredevelopingamethodnamedCreateCountersthatwillcreateperformancecountersforan

    application.Themethodincludesthefollowingcode.(Linenumbersareincludedforreference

    only.)

    YouneedtoensurethatCounter2isavailableforuseinWindowsPerformanceMonitor

    (PerfMon).

    Whichcodesegmentshouldyouinsertatline16?

    A. CounterType=PerformanccCounterType.RawBase

    B. CounterType=PerformanceCounterType.AverageBase

    C.

    CounterType=PerformanceCounterType.SampleBase

    D. CounterType=PerformanceCounterType.CounterMultiBase

    Correct

    Answer:

    B

    QUESTION

    64

    Youaredevelopinganapplicationthatwilltransmitlargeamountsofdatabetweenaclient

    computerandaserver.Youneedtoensurethevalidityofthedatabyusingacryptographic

    hashingalgorithm.Whichalgorithmshouldyouuse?

    A. ECDsa

  • 7/24/2019 70-483 MS Certifikat Dump C#

    68/135

    B. RNGCryptoServiceProvider

    C. Rfc2898DeriveBytes

    D. HMACSHA512

    Correct

    Answer:

    D

    QUESTION

    65

    YouaredevelopinganapplicationbyusingC#.Theapplicationincludesanobjectthatperformsa

    longrunningprocess.Youneedtoensurethatthegarbagecollectordoesnotreleasetheobjects

    resourcesuntiltheprocesscompletes.Whichgarbagecollectormethodshouldyouuse?

    A. WaitForFullGCComplete()

    B. SuppressFinalize()

    C. collect()

    D. RemoveMemoryPressure()

    Correct

    Answer:

    B

    QUESTION

    66

    YouareimplementingamethodnamedFloorTemperaturethatperformsconversionsbetween

    valuetypesandreferencetypes.Thefollowingcodesegmentimplementsthemethod.(Line

    numbersareincludedforreferenceonly.)

    Youneedtoensurethattheapplicationdoesnotthrowexceptionsoninvalidconversions.

    Whichcodesegmentshouldyouinsertatline04?

    A.

    int

    result

    =

    (int)degreesRef;

    B. intresult=(int)(double)degreesRef;

    C. intresult=degreesRef;

    D. intresult=(int)(float)degreesRef;

    Correct

    Answer:

    A

    QUESTION

    67

    YouaredevelopinganapplicationbyusingC#.Theapplicationincludesanobjectthatperformsa

    longrunning

    process.

    You

    need

    to

    ensure

    that

    the

    garbage

    collector

    does

    not

    release

    the

    objects

    resourcesuntiltheprocesscompletes.Whichgarbagecollectormethodshouldyouuse?

  • 7/24/2019 70-483 MS Certifikat Dump C#

    69/135

    A. WaitForFullGCComplete()

    B. SuppressFinalize()

    C. WaitForFullGCApproach()

    D.

    WaitForPendingFinalizers()

    Correct

    Answer:

    B

    QUESTION

    68

    DRAGDROP

    Youaredevelopinganapplicationthatimplementsasetofcustomexceptiontypes.Youdeclare

    thecustomexceptiontypesbyusingthefollowingcodesegments:

    TheapplicationincludesafunctionnamedDoWorkthatthrows.NETFrameworkexceptionsand

    customexceptions.Theapplicationcontainsonlythefollowingloggingmethods:

    e="cursor:auto;margin:0cm0cm0pt;lineheight:normal;textautospace:;msolayoutgrid

    align:none"align="left">Theapplicationmustmeetthefollowingrequirements:

    WhenContosoValidationExceptionexceptionsarecaught,logtheinformationbyusingthe

    staticvoidLog(ContosoValidationExceptionex)method.

    WhenContosoDbExceptionorotherContosoExceptionexceptionsarecaught,logthe

    informationbyusingthestaticvoidLog(ContosoExceptionex)method.

    Youneedtomeettherequirements.

    Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriatecodesegmentsto

    thecorrectlocationsintheanswerarea.Eachcodesegmentmaybeusedonce,morethanonce,

    ornotatall.Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    70/135

    Correct

    Answer:

    QUESTION

    69

    Youaredevelopinganapplicationthatusesstructuredexceptionhandling.Theapplication

    includes

    a

    class

    named

    Logger.

    The

    Logger

    class

    implements

    a

    method

    named

    Log

    by

    using

    the

    followingcodesegment:

    publicstaticvoidLog(Exceptionex){}

    Youhavethefollowingrequirements:

    LogallexceptionsbyusingtheLog()methodoftheLoggerclass.

    Rethrowtheoriginalexception,includingtheentireexceptionstack.

    Youneedtomeettherequirements.Whichcodesegmentshouldyouuse?

  • 7/24/2019 70-483 MS Certifikat Dump C#

    71/135

    Correct

    Answer:

    D

    QUESTION

    7

    DRAGDROP

    YouaredevelopinganapplicationthatwillincludeamethodnamedGetData.TheGetData()

    methodwillretrieveseverallinesofdatafromawebservicebyusingaSystem.IO.StreamReader

    object.

    Youhavethefollowingrequirements:

    TheGetData()methodmustreturnastringvaluethatcontainstheentireresponsefromthe

    webservice.

    TheapplicationmustremainresponsivewhiletheGetData()methodruns.

    YouneedtoimplementtheGetData()method.

    Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriateobjectstothe

    correctlocationsintheanswerarea.Eachobjectmaybeusedonce,morethanonce,ornotatall.

    Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    72/135

    Correct

    Answer:

    QUESTION

    7

    YouaredevelopinganapplicationthatincludesaclassnamedBookTrackerfortrackinglibrary

    books.The

    application

    includes

    the

    following

    code

    segment.

    (Line

    numbers

    are

    included

    for

    referenceonly.)

    YouneedtoaddabooktotheBookTrackerinstance.Whatshouldyoudo?

  • 7/24/2019 70-483 MS Certifikat Dump C#

    73/135

    Correct

    Answer:

    A

    QUESTION

    72

    YouusetheTask.Run()methodtolaunchalongrunningdataprocessingoperation.Thedata

    processingoperationoftenfailsintimesofheavynetworkcongestion.Ifthedataprocessing

    operationfails,asecondoperationmustcleanupanyresultsofthefirstoperation.Youneedto

    ensurethatthesecondoperationisinvokedonlyifthedataprocessingoperationthrowsan

    unhandledexception.Whatshouldyoudo?

    A. Createataskwithintheoperation, and set the Task.StartOnError propertytotrue.

    B. CreateaTaskFactoryobjectandcall the ContinueWhenAll() method oftheobject.

    C. CreateataskbycallingtheTask.ContinueWith() method.

    D.

    Usethe

    TaskScheduler

    class

    to

    create a task and call the TryExecuteTask()

    method

    on

    the class.

    Correct

    Answer:

    C

  • 7/24/2019 70-483 MS Certifikat Dump C#

    74/135

    QUESTION73

    YouaredevelopinganapplicationbyusingG#.Youprovideapublickeytothedevelopmentteam

    duringdevelopment.Youneedtospecifythattheassemblyisnotfullysignedwhenitisbuilt.

    Whichtwoassemblyattributesshouldyouincludeinthesourcecode?(Eachcorrectanswer

    presentspartofthesolution.Choosetwo.)

    A. AssemblyFlagsAttribute

    B. AssemblyKeyFileAttribute

    C. AssemblyConfigurationAttribute

    D. AssemblyDelaySignAttribute

    Correct

    Answer:

    BD

    QUESTION

    74

    Youaredevelopinganapplicationthatwilltransmitlargeamountsofdatabetweenaclient

    computerandaserver.Youneedtoensurethevalidityofthedatabyusingacryptographic

    hashingalgorithm.Whichalgorithmshouldyouuse?

    A. RSA

    B. HMACSHA2S6

    C. Aes

    D. RNGCryptoServiceProvider

    Correct

    Answer:

    B

    QUESTION

    75

    YouaredevelopinganapplicationthatusestheMicrosoftADO.NETEntityFrameworktoretrieve

    orderinformationfromaMicrosoftSQLServerdatabase.Theapplicationincludesthefollowing

    code.(Linenumbersareincludedforreferenceonly.)

    Theapplicationmustmeetthefollowingrequirements:

    Returnonly

    orders

    that

    have

    an

    OrderDate

    value

    other

    than

    null.

    Return

    only

    orders

    that

    were

    placedintheyearspecifiedintheyearparameter.

  • 7/24/2019 70-483 MS Certifikat Dump C#

    75/135

    Youneedtoensurethattheapplicationmeetstherequirements.Whichcodesegmentshould

    youinsertatline08?

    Correct

    Answer:

    B

    QUESTION

    76

    Youarecreatinganapplicationthatmanagesinformationaboutyourcompanysproducts.The

    applicationincludesaclassnamedProductandamethodnamedSave.

    TheSave()methodmustbestronglytyped.ItmustallowonlytypesinheritedfromtheProduct

    classthatuseaconstructorthatacceptsnoparameters.

    YouneedtoimplementtheSave()method.

    Whichcodesegmentshouldyouuse?

    Correct

    Answer:

    D

  • 7/24/2019 70-483 MS Certifikat Dump C#

    76/135

    QUESTION

    77

    YouarecreatingaclassnamedEmployee.Theclassexposesastringpropertynamed

    EmployeeType.ThefollowingcodesegmentdefinestheEmployeeclass.(Linenumbersare

    includedforreferenceonly.)

    TheEmployeeTypepropertyvaluemustmeetthefollowingrequirements:

    ThevaluemustbeaccessedonlybycodewithintheEmployeeclassorwithinaclassderived

    fromtheEmployeeclass.

    Thevalue

    must

    be

    modified

    only

    by

    code

    within

    the

    Employee

    class.

    YouneedtoensurethattheimplementationoftheEmployeeTypepropertymeetsthe

    requirements.

    Whichtwoactionsshouldyouperform?(Eachcorrectanswerrepresentspartofthecomplete

    solution.Choosetwo.)

    A

    Replaceline03withthefollowing code segment:

    publicstringEmployeeType

    B.Replace

    line

    06

    with

    the

    following code segment:

    protectedset;

    C.

    Replaceline05withthefollowing code segment:

    privateget;

    D.

    Replaceline05withthefollowing code segment:

    protectedget;

    E.

    Replaceline03withthefollowing code segment:

    protectedstringEmployeeType

    F.

    Replaceline06withthefollowing code segment:

    privateset;

    Correct

    Answer:

    EF

    QUESTION

    78

    YouaredevelopinganapplicationbyusingC#.Theapplicationincludesanobjectthatperformsa

    longrunningprocess.Youneedtoensurethatthegarbagecollectordoesnotreleasetheobjects

    resourcesuntiltheprocesscompletes.Whichgarbagecollectormethodshouldyouuse?

    A. RemoveMemoryPressure()

    B.

    ReRegisterForFinalize()

    C. WaitForFullGCComplete()

  • 7/24/2019 70-483 MS Certifikat Dump C#

    77/135

    D. KeepAlive()

    Correct

    Answer:

    D

    QUESTION

    79

    Youare

    developing

    an

    application

    that

    will

    transmit

    large

    amounts

    of

    data

    between

    aclient

    computerandaserver.Youneedtoensurethevalidityofthedatabyusingacryptographic

    hashingalgorithm.Whichalgorithmshouldyouuse?

    A. RSA

    B. Aes

    C. HMACSHA256

    D. DES

    Correct

    Answer:

    C

    QUESTION

    8

    DRAGDROP

    YouaredevelopinganapplicationbyusingC#.Theapplicationwillprocessseveralobjectsper

    second.Youneedtocreateaperformancecountertoanalyzetheobjectprocessing.Whichthree

    actionsshouldyouperforminsequence?(Toanswer,movetheappropriateactionsfromthelist

    ofactionstotheanswerareaandarrangetheminthecorrectorder.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    78/135

    Correct

    Answer:

    QUESTION

    8

    Youaredevelopinganapplication.Theapplicationcallsamethodthatreturnsanarrayofintegers

    namedcustomerIds.YoudefineanintegervariablenamedcustomerIdToRemoveandassigna

    valueto

    it.

    You

    declare

    an

    array

    named

    filteredCustomerIds.

    Youhavethefollowingrequirements.

    RemoveduplicateintegersfromthecustomerIdsarray.

    Sortthearrayinorderfromthehighestvaluetothelowestvalue.

    RemovetheintegervaluestoredinthecustomerIdToRemovevariablefromthecustomerIds

    array.

    YouneedtocreateaLINQquerytomeettherequirements.

    Whichcode

    segment

    should

    you

    use?

    Correct

    Answer:

    C

  • 7/24/2019 70-483 MS Certifikat Dump C#

    79/135

    QUESTION82

    Youaredevelopinganapplicationthatwilltransmitlargeamountsofdatabetweenaclient

    computerandaserver.Youneedtoensurethevalidityofthedatabyusingacryptographic

    hashingalgorithm.Whichalgorithmshouldyouuse?

    A.

    DES

    B. HMACSHA512

    C. RNGCryptoServiceProvider

    D. ECDsa

    Correct

    Answer:

    B

    QUESTION

    83

    YouaredevelopingaC#applicationthatincludesaclassnamedProduct.Thefollowingcode

    segmentdefines

    the

    Product

    class:

    YouimplementSystem.ComponentModel.DataAnnotations.IValidateableObjectinterfaceto

    provideawaytovalidatetheProductobject.

    TheProductobjecthasthefollowingrequirements:

    TheIdpropertymusthaveavaluegreaterthanzero.

    TheNamepropertymusthaveavalueotherthanemptyornull.

    YouneedtovalidatetheProductobject.Whichcodesegmentshouldyouuse?

  • 7/24/2019 70-483 MS Certifikat Dump C#

    80/135

    Correct

    Answer:

    B

    QUESTION

    84

    DRAGDROP

    Youhavethefollowingclass:

    YouneedtoimplementIEquatable.TheEqualsmethodmustreturntrueifbothIDandNameare

    settotheidenticalvalues.Otherwise,themethodmustreturnfalse.Equalsmust

    notthrow

    an

    exception.

    Whatshouldyoudo?(Developthesolutionbyselectingandorderingtherequiredcodesnippets.

    Youmaynotneedallofthecodesnippets.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    81/135

    Correct

    Answer:

    QUESTION

    85

    HOTSPOT

    Youarereviewingthefollowingcode:

    Foreachofthefollowingstatements,selectYesifthestatementistrue.Otherwise,selectNo.

  • 7/24/2019 70-483 MS Certifikat Dump C#

    82/135

    Correct

    Answer:

    QUESTION

    86

    HOTSPOT

    Youhavethefollowingcode:

    Toanswer,completeeachstatementaccordingtotheinformationpresentedinthecode.

  • 7/24/2019 70-483 MS Certifikat Dump C#

    83/135

    Correct

    Answer:

    QUESTION

    87

    HOTSPOT

    Youhavethefollowingcode:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    84/135

    For

    each

    of

    the

    following

    statements,

    select

    Yes

    if

    the

    statement

    is

    true.

    Otherwise,

    select

    No.

    Correct

    Answer:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    85/135

    QUESTION

    88

    DRAGDROP

    YouhaveamethodnamedGetCustomerIDsthatreturnsalistofintegers.Eachentryinthelist

    representsacustomerIDthatisretrievedfromalistnamedCustomers.TheCustomerslist

    contains1,000rows.>

    AnotherdevelopercreatesamethodnamedValidateCustomerthatacceptsanintegerparameter

    andreturnsaBooleanvalue.ValidateCustomerreturnstrueiftheintegerprovidedreferencesa

    validcustomer.ValidateCustomercantakeuptoonesecondtorun.

    YouneedtocreateamethodthatreturnsalistofvalidcustomerIDs.Thecodemustexecutein

    theshortestamountoftime.

    Whatshouldyoudo?(Developthesolutionbyselectingandorderingtherequiredcodesnippets.

    Youmaynotneedallofthecodesnippets.)

    Correct

    Answer:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    86/135

    QUESTION

    89

    YouarecreatingaclassnamedGame.TheGameclassmustmeetthefollowingrequirements:

    IncludeamemberthatrepresentsthescoreforaGameinstance.

    Allowexternalcodetoassignavaluetothescoremember.

    Restricttherangeofvaluesthatcanbeassignedtothescoremember.

    Youneedtoimplementthescoremembertomeettherequirements.

    Inwhichformshouldyouimplementthescoremember?

    A. protectedfield

    B. publicstaticfield

    C. publicstaticproperty

    D. publicproperty

    Correct

    Answer:

    D

    QUESTION

    9

    YouhaveaListobjectthatisgeneratedbyexecutingthefollowingcode:

    Youhave

    amethod

    that

    contains

    the

    following

    code

    (line

    numbers

    are

    included

    for

    reference

    only):

  • 7/24/2019 70-483 MS Certifikat Dump C#

    87/135

    Youneedtoalterthemethodtousealambdastatement.Howshouldyourewritelines03

    through06ofthemethod?

    Correct

    Answer:

    C

    QUESTION

    9

    YouaredevelopingcodeforaclassnamedAccount.TheAccountclassincludesthefollowing

    method:

    Youneed

    to

    ensure

    that

    overflow

    exceptions

    are

    thrown

    when

    there

    is

    an

    error.

    Whichtypeofblockshouldyouuse?

    A. checked

    B. try

    C. using

    D. unchecked

    Correct

    Answer:

    A

  • 7/24/2019 70-483 MS Certifikat Dump C#

    88/135

    QUESTION

    92

    Youaredevelopinganapplicationthatusesa.configfile.Therelevantportionofthe.configfileis

    shownasfollows:

    Youneedtoensurethatdiagnosticdatafortheapplicationwritestotheeventtogbyusingthe

    configurationspecifiedinthe.configfile. Whatshouldyouincludeintheapplicationcode?

    Correct

    Answer:

    D

    QUESTION

    93

    Youhavethefollowingcode(linenumbersareincludedforreferenceonly):

  • 7/24/2019 70-483 MS Certifikat Dump C#

    89/135

    Youneedtoidentifythemissinglineofcodeatline15.Whichlineofcodeshouldyouidentify?

    A. using(fooSqlConn.BeginTransaction())

    B. while(fooSqlReader.Read())

    C. while(fooSqlReader.NextResult())

    D. while(fooSqlReader.GetBoolean(0))

    Correct

    Answer:

    B

    QUESTION

    94

    HOTSPOT

    YouaredevelopinganapplicationinC#.

    Theapplication

    will

    display

    the

    temperature

    and

    the

    time

    at

    which

    the

    temperature

    was

    recorded.Youhavethefollowingmethod(linenumbersareincludedforreferenceonly):

    YouneedtoensurethatthemessagedisplayedinthelblMessageobjectshowsthetime

    formattedaccording

    to

    the

    following

    requirements:

    Thetimemustbeformattedashour:minuteAM/PM,forexample2:00PM.

    Thedatemustbeformattedasmonth/day/year,forexample04/21/2013.

    Thetemperaturemustbeformattedtohavetwodecimalplaces,forexample23 45.

    Whichcodeshouldyouinsertatline04?(Toanswer,selecttheappropriateoptionsintheanswer

    area.)

    Correct

    Answer:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    90/135

    QUESTION

    95

    HOTSPOT

    YouaredevelopinganapplicationthatincludesaWindowsCommunicationFoundation(WCF)

    service.TheserviceincludesacustomTraceSourceobjectnamedtsandamethodnamed

    DoWork.Theapplicationmustmeetthefollowingrequirements:

    CollecttraceinformationwhentheDoWork()methodexecutes.

    GroupalltracesforasingleexecutionoftheDoWork()methodasanactivitythatcanbeviewed

    intheWCFServiceTraceViewerTool.

    Youneedtoensurethattheapplicationmeetstherequirements.

    Howshouldyoucompletetherelevantcode?(Toanswer,selectthecorrectcodesegmentfrom

    eachdropdownlistintheanswerarea.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    91/135

    Correct

    Answer:

  • 7/24/2019 70-483 MS Certifikat Dump C#

    92/135

    QUESTION

    96

    DRAGDROP

    YouaredevelopingaclassnamedTemperature.Youneedtoensurethatcollectionsof

    Temperatureobjectsaresortable.Howshouldyoucompletetherelevantcodesegment?(To

    answer,dragtheappropriatecodesegmentstothecorrectlocationsintheanswerarea.Each

    codesegmentmaybeusedonce,morethanonce,ornotatall.Youmayneedtodragthesplitbar

    betweenpanesorscrolltoviewcontent.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    93/135

    Correct

    Answer:

    QUESTION

    97

    DRAGDROP

    Youare

    developing

    an

    application

    that

    will

    populate

    an

    extensive

    XML

    tree

    from

    aMicrosoft

    SQL

    Server2008R2databasetablenamedContacts.

  • 7/24/2019 70-483 MS Certifikat Dump C#

    94/135

    YouarecreatingtheXMLtree.Thesolutionmustmeetthefollowingrequirements:

    Minimizememoryrequirements.

    Maximizedataprocessingspeed.

    Youopenthedatabaseconnection.

    ass="MsoNormal"style="cursor:auto;margin:0cm0cm0pt;lineheight:normal;textautospace:

    ;msolayoutgridalign:none"align="left">

    YouneedtocreatetheXMLtree.

    Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriatecodesegmentsto

    thecorrectlocationsintheanswerarea.Eachcodesegmentmaybeusedonce,morethanonce,

    ornotatall.Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)

    Correct

    Answer:

    QUESTION

    98

    DRAGDROP

    YouarecreatingaclassnamedDatathatincludesadictionaryobjectnamed_data.Youneedto

    allowthegarbagecollectionprocesstocollectthereferencesofthe_dataobject.Howshouldyou

    completetherelevantcode?(Toanswer,dragtheappropriatecodesegmentstothecorrect

    locationsintheanswerarea.Eachcodesegmentmaybeusedonce,morethanonce,ornotatall.

    Youmay

    need

    to

    drag

    the

    split

    bar

    between

    panes

    or

    scroll

    to

    view

    content.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    95/135

    Correct

    Answer:

    QUESTION

    99

    YouarecreatingaconsoleapplicationnamedApp1.

    App1retrievesdatafromtheInternetbyusingJavaScriptObjectNotation(JSON).

    Youaredevelopingthefollowingcodesegment(linenumbersareincludedforreferenceonly):

    YouneedtoensurethatthecodevalidatestheJSONstring.

    Whichcode

    should

    you

    insert

    at

    line

    03?

    A. DataContractSerializerserializer= new DataContractSerializer();

    B. varserializer=newDataContractSerializer();

    C. XmlSerlalizerserializer=newXmlSerlalizer();

    D. varserializer=newJavaScriptSerializer();

    Correct

    Answer:

    D

    Explanation:

    TheJavaScriptSerializer

    Class

    Provides

    serialization

    and

    deserialization

    functionality

    for

    AJAX

    enabledapplications.

  • 7/24/2019 70-483 MS Certifikat Dump C#

    96/135

    TheJavaScriptSerializerclassisusedinternallybytheasynchronouscommunicationlayerto

    serializeanddeserializethedatathatispassedbetweenthebrowserandtheWeb

    server.Youcannotaccessthatinstanceoftheserializer.However,thisclassexposesapublicAPI.

    Therefore,you

    can

    use

    the

    class

    when

    you

    want

    to

    work

    with

    JavaScript

    Object

    Notation

    (JSON)

    in

    managedcode.

    QUESTION

    Youaredevelopinganapplicationthatusesseveralobjects.Theapplicationincludesthefollowing

    codesegment.(Linenumbersareincludedforreferenceonly.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    97/135

    Whenyourunthecode,youreceivethefollowingerrormessage:Cannotimplicitlyconverttype

    objecttoint.Anexplicitconversionexists(areyoumissingacast?).

    Youneedtoensurethatthecodecanbecompiled.Whichcodeshouldyouusetoreplaceline05?

    A.

    var2=arra1[0]

    is

    int;

    B. var2=((List)array1)[0];

    C. var2=array1[0].Equals(typeof(int));

    D. var2=(int)array1 [0];

    Correct

    Answer:

    D

    Explanation:

    Makealistofintegersofthearraywith=((List)array1)thenselectthefirstiteminthelist

    with[0].

    QUESTION

    2

    YouneedtowriteamethodthatretrievesdatafromaMicrosoftAccess2013database.The

    methodmustmeetthefollowingrequirements:

    Bereadonly.

    Beabletousethedatabeforetheentiredatasetisretrieved.

    Minimizetheamountofsystemoverheadandtheamountofmemoryusage.

    Whichtypeofobjectshouldyouuseinthemethod?

    A. SqlDataAdapter

    B. DataContext

    C. DbDataAdapter

    D. OleDbDataReader

    Correct

    Answer:

    D

    Explanation:

    OleDbDataReaderClass

    Providesawayofreadingaforwardonlystreamofdatarowsfromadatasource.

    Example:

    OleDbConnectioncn=newOleDbConnection();

    OleDbCommandcmd=newOleDbCommand();

    DataTableschemaTable;

    OleDbDataReadermyReader;

    //OpenaconnectiontotheSQLServerNorthwinddatabase.cn.ConnectionString=

    Provider=SQLOLEDB;DataSource=server;UserID=login;Password=password;Initial

    Catalog=Northwind;

  • 7/24/2019 70-483 MS Certifikat Dump C#

    98/135

    QUESTION

    3

    Youhavethefollowingcode:

    Youneedtoretrieveallofthenumbersfromtheitemsvariablethataregreaterthan80.

    Whichcodeshouldyouuse?

    Correct

    Answer:

    A

    QUESTION

    4

    DRAGDROP

    Youarecreatingamethodthatwillsplitasingleinputfileintotwosmalleroutputfiles.

    Themethodmustperformthefollowingactions:

    Createafilenamedheader.datthatcontainsthefirst20bytesoftheinputfile.

    Createafilenamedbody.datthatcontainstheremainderoftheinputfile.

    Youneedtocreatethemethod.

    Howshouldyoucompletetherelevantcode?(Toanswer,dragtheappropriatecodesegmentsto

    thecorrectlocationsintheanswerarea.Eachcodesegmentmaybeusedonce,morethanonce,

    ornotatall.Youmayneedtodragthesplitbarbetweenpanesorscrolltoviewcontent.)

  • 7/24/2019 70-483 MS Certifikat Dump C#

    99/135

    Correct

    Answer:

    QUESTION

    5

    DRAGDROP

    Youareaddingafunctiontoamembershiptrackingapplication Thefunctionusesaninteger

    namedmemberCodeasaninputparameterandreturnsthemembershiptypeasastring.

    Thefunctionmustmeetthefollowingrequirements:

    ReturnNonMemberifthememberCodeis0.

    ReturnMember

    ifthe

    memberCode

    is

    1.

    ReturnInvalidifthememb