Tin Học >> Lập trình >> C#
|| C#
C++
Visual Basic
Visual Foxpro
C
Java
Pascal
Thiết Kế Web
ASP.NET
XML
CSS
PHP
Có 53 bài trong 6 trang (10 bài/trang) và bạn đang ở trang 5.
namespace Spacel{ namespace Space2{ class MyClass{ } } } The fully qualified name of class MyClass is: a. Space2.Space1.MyClass() b. Space1.Space2.MyClass() c. Space1.MyClass() d. Space2.MyClass()...... namespace College.Library{ namespace Shelf{ class Book{ } } } The fully qualified name of class Book is: a. College.Library.Book() b. Library.Shelf.Book() c. Shelf.Book() d. College.library.Shelf.Book()..... In the body of a method, C# uses # a. call b. do c. that d. this..... In C# datatypes are divided into two fundamental categories: a. Class and Non-Class type b. Value types and reference types c. Pointers and values d. Pointers and Non-Pointers..... In order to add or remove an event from # a. event can only be added with the += and not removed# b. the Add anad Subtract methods c. the Add and Remove methods d. the += and the -= operators..... If an IndexofAny method is passed an # a. finds the first occurrence of each letter in the string b. generates an error c. will search for the first occurrence of the sequence of characters # d. searches for the first occurrence of any of the characters #.... If a programmer inserts "using System"# System.Console.out.WriteLine("Hello");? a. Console.WriteLine("Hello"); b. Console.Out("Hello"); c. WriteLine("Hello"); d. System("Hello");...... If you want to use the Book class for store 500 books, write a segment to how use to declare and create your instantiations. a. Book[] store = new Book[500]: for (int i = 0; i < store.Lenght; i++) store[i] = new Book();..... How do you prevent users from resizing a form? a. Setting the Resize to false and setting the MaximizeBox property to false b. Setting the FormBorderStyle to FixeDialog c. Setting the FormStyle to Dialog d. Setting the FormBorderStyle to FixeDialog and setting the MaximizeBox property to false..... How to get a random number, no larger than 108, no smaller than 1? (in[1...108]) a. Random randNum = new Random(); randNum.Next(1. 108); b. Random randNum; randNum.Next(1. 108); c. Random randNum = new Random(); randNum.Next(108) + 1; d. Random randNum = new Random(); randNum.Next(0. 108);..... How can I disable the right-click context menu in my textboc? a. You can set the DisableMenu property of the TextBox to true b. You can set the ContextMenu property of the TextBox to a dummy, empty ContextMenu instance c. You can set the IsMenuContextEnable property of the TextBox to false d. You can set the ContextMenu property of the TextBox to a null string..... How do you set the default button button1 for a form Form1? a. Form1.ButtonDefault = button1; b. Form1. DefaultButton = button1; c. Form1. IsDefaultButton = Form1; d. Form1.AcceptButton = button1;..... Find any errors in the following BankAccout contructor: Public int BankAccount ( ) { Balance = 0; } a. No errors b. Name c. Return type d. Format parameters.... For decimal, the default calue is ____. a. 0.0m b. 0.0d c. 0 d. Nonr of the above..... for(int i = 0; i<2; i++) for(int j = 0; j<3; j++ if (i= =j) continue; Console.WriteLine ("i={0} j={1}, i, j); Which lines would be the part of output? ..... Delegates act as: a. a way to call many methods at once b. a go between for objects raising events and the method# c. masks for methods that handle events d. ways of sorting events..... Even KeyPress: a. Occurs when a key is pressed while the control has focus. This event always occurs after KeyDown and KeyUp b. Occurs when a key is pressed while the control has focus. This event always occurs after KeyUp and before KeyDown c. Occurs when a key is pressed while the control has focus. This event always occurs before KeyDown and KeyUp d. Occurs when a key is pressed while the control has focus. This event always occurs after KeyDown and before KeyUp..... Concatenating with strings are done with: a. method calls b. operator overloading c. reserved words d. operator overloading and method calls..... Concatenating with strings are done with: a. method calls b. operator overloading c. reserved words d. operator overloading and method calls..... class IndexExample{ String Message; Public static void Main() { IndexExample obj=new IndexExample("WELCOME"); for(int i=0; i < 7; i++) { System.Comsole.Write(obj[i]); } } Public IndexExample (string s) { Message=s } Public string this[int 1] { get { if(i >= 0 && i < Message.Length) return Message.Substring(i, 1: ; else return ""; set { if(i >= 0 && i < Message.Length) Message=Message.Substring(0,i: +value + Message.Substring(i+1); } } } What will be the output of above code? a. The code will compile successfully and output will be; WELCOME b. All over above c. Code will generate a run t By default the compiler opens ____ assembly. a. system.dll b. namespace.dll c. mscorlib.dll d. Cdefault.dll.... C# us case-sensitive. a. True b. False c. Depend on setting options from Visual Studio.NET d. Depend on Operating System..... C# applications begin execution at method ____. a. other b. load c. void d. main.... |