2013年微軟認(rèn)證練習(xí)及答案57

字號:

為大家收集整理了《2013年微軟認(rèn)證練習(xí)及答案57》供大家參考,希望對大家有所幫助?。。?BR>    1下列程序中,DllImport屬性的用法是否正確 ()
    public class Test
    [DllImport("kernel32.dll",EntryPoint="movefilew",CharSet=CharSet.Ansi)]
    public int movefile(string src ,string dst);
    A,錯(cuò)誤
    B,正確
    答案:A
    2以下類TestClass中,只讀屬性Count的聲明是否合法 ()
    public class TestClass
    {
    private int i ;
    public int Count
    {
    get
    {
    return this.i;
    }
    }
    }
    A,不合法
    B,合法
    答案:B
    3,在C#程序中,為了給類型CompCS.SringComponent起一個(gè)別名CsStringComp,其正確的語法是().
    A,using CsStringComp=CompCS.StringComponent;
    B,imports CsStringComp=CompCS.StringComponent;
    C,Alias CsStringComp=CompCS.StringComponent;
    D,Dim CompVB.StringComponent As CsStringComp
    答案:A
    4,在.NET Framework Class Library中提供了()技術(shù),以使托管應(yīng)用程序可以斷開式的方式訪問各種數(shù)據(jù)源.
    A,SQL Server
    B,ADO.NET
    C,ODBC.NET
    D,ADO
    答案:B
    5,接口ISomeInterface中只包含一個(gè)屬性Name,該屬性滿足:
    公有
    可讀可寫
    字符串類型
    則該接口的定義應(yīng)為().
    interface SomeInterface
    {public readonly string Name(){get;set;}}
    interface SomeInterface
    {public string Name{get;set;}};
    c interface SomeInterface
    { string Name{get;set;}}
    D,interface SomeInterface
    {readonly Name(){get;set;}}
    答案: C