Tìm kiếm:
TRANG NHÀ
Giới thiệu VNEDU.ORG
Điều khoản và bản quyền
Liên lạc VNEDU
TRẮC NGHIỆM TRỰC TUYẾN
---Công Cụ:---
Soạn Biểu thức
Bảng màu HTML
Ký hiệu đặc biệt 01
Ký hiệu đặc biệt 02
Ký hiệu đặc biệt 03
Ký hiệu đặc biệt 04
Ký hiệu đặc biệt 05
Ký hiệu đặc biệt 06
Ký hiệu đặc biệt 07
Ký hiệu đặc biệt [Toán]
Tin Học   ||  Căn Bản    Văn Phòng    Hệ Thống - Mạng    Phần Mềm Ứng Dụng    Kỹ thuật số    Lập trình    SQL  

Trắc Nghiệm C Sharp - Bài 14
Ngày làm bài: Hôm nay lúc 21:44:24 (Server time)
Số câu hỏi: 10.   Tổng điểm: 10
Yêu cầu hoàn thành: 60 phút.
Thời gian còn lại: 
Cỡ chữ câu hỏi:  Cỡ chữ đáp án:


1-
StreamWriter viet = null;
try
{
SaveFileDialog sDlg = new SaveFileDialog( );
sDlg.Filter = "Text File(*.txt) | *.txt | All Files(*.*) | *.*";
if (sDlg.ShowDialog( ) = = DialogResult.OK)
{
viet = new StreamWriter(sDlg.FileName);
viet.Write(txtNoidung.Text);
}
} catch (Exception ex)
{
MessageBox.Show(ex.ToString( )) ;
} finally
{
viet.Close( );
}
What will be the fragment of above code?
  A - 
Write contain text txtNoidung to file Data.txt
  B - 
The code will generate an error
  C - 
Write contain text in txtNoidung to file chose in SaveFileDialog sDlg
  D - 
All way save text in txtNoidung to file Data.txt
2-
String indexers treat strings as:
  A - 
1 to string Lenght
  B - 
arrays of chareacters
  C - 
binary code
  D - 
a character
3-
String mystring; Creates a(n) ____.
  A - 
Object
  B - 
property
  C - 
Constructor
  D - 
Class
4-
StringBuilder buffer = new StringBuilder("Hello, how are you?");
buffer = buffer + buffer.Append("Thang");
What will be the fragment of above code assign to buffer variable?
  A - 
The code will generate an error
  B - 
Hello, how are you?
Thang
  C - 
Hello, how are you?Thang
  D - 
None of the others answers
5-
StringBuilder buffer = new StringBuilder("Hello, how are you?");
buffer.Lenght = 6;
buffer.Append("To day!");
What will be the fragment of above code assign to buffer variable?
  A - 
Hello, how are you? Today!
  B - 
The code will generate an error
  C - 
Hello, Today!
  D - 
None of the other answers
6-
StringBuilder buffer = new StringBuilder("Hello, how are you?");
buffer.Insert(5, 123);
What will be the fragment of above code assign to buffer variable?
  A - 
Hello123, how are you?
  B - 
The code will generate an error
  C - 
Hello123o, how are you?
  D - 
None of the other answers
7-
StringBuilder buffer = new StringBuilder("Hello, how are you?");
buffer = buffer + buffer.Replace("Hello", "Hello Thang");
What will be the fragment of above code assign to buffer variable?
  A - 
Hello Thang
  B - 
None ofther other answers
  C - 
The code will generate an error
  D - 
Hello Thang, how are you?
8-
Suppose the first two lines of the file DATA.TXT contain the strings "Clint" and "1930". What is Displayed by the following lines of code?
try
{
OpenFileDialog dlg = new OpenFileDialog( );
dlg.Filter = "Text File(*.txt) | *.txt | All Files(*.*) | *.*};
dlg.FilterIndex = 1;
dlg.Multiselect = false;
if (dlg.ShowDialog( ) = =DialogResult.OK)
{
StreamReader doc = new StreamReader (dlg.FileName);
string nd1 = doc.ReadLine( );
int nd2 = Convert.ToInt32 ( doc.ReadLine( ));
txtNoidung.Text = "In 2008, " + nd1 + " will be " + (2008 – nd2);
doc.Close ( );
}
} catch (Exeption ex)
{
MessageBox.Show(ex.Tostring( ));
}
  A - 
j In 2008, "Clint" will be 78
  B - 
In 2008, "Clint" will be 78
  C - 
j Clint,1930
  D - 
j In 2008, Clint will be 2008-1930
9-
The DoWork method increments a the argument:
static void DoWork(out int param)
{
param = 42;
}
stattic void Main( )
{
int arg;
DoWork(out arg);
Console.WriteLien(arg);
}
The result on the screen is:
  A - 
example does not compile by error syntax
  B - 
Write a random value
  C - 
writes 42
  D - 
example does not compile by error because arg is initialized
10-
System namespace is used in the C# programs to:
  A - 
capture program ouputs
  B - 
interact with other classes in the namespcae
  C - 
interact with the system enviroment
  D - 
interact with the operating system
 
[Người đăng: Thành Lãm - ST]
Ghé thăm Kênh của Vị Sư "hai lần chết đi sống lại"
Tu Si Chau Soc Thon

https://www.youtube.com/channel/UCoyC9WTTVR-M3qpTKKEXGnQ

Chau Soc Thon Official Channel


Phong Bảo Official
Phong Bao Official
Xem Nhiều nhất
Trắc Nghiệm Pascal - Bài 20
Trắc Nghiệm ASP.NET - Bài 12
Trắc Nghiệm Ngôn Ngữ Lập Trình C - Bài 16
Trắc Nghiệm ASP.NET - Bài 01
Trắc Nghiệm ASP.NET - Bài 03
Trắc nghiệm C++ - Bài 18
Trắc Nghiệm C# - Bài 53
Trắc Nghiệm ASP.NET - Bài 02
Trắc Nghiệm C# - Bài 42
Trắc Nghiệm Java - Bài 01
Trắc Nghiệm ASP.NET - Bài 04
Trắc Nghiệm Pascal - Bài 22
Trắc Nghiệm ASP.NET - Bài 13
Trắc Nghiệm ASP.NET - Bài 09
Trắc Nghiệm ASP.NET - Bài 08
Trắc nghiệm PHP - Bài 01
Trắc Nghiệm ASP.NET - Bài 06
Trắc Nghiệm ASP.NET - Bài 11
Trắc Nghiệm ASP.NET - Bài 05
Trắc Nghiệm ASP.NET - Bài 23
Đề Xuất
Trắc nghiệm C++ - Bài 19
Trắc Nghiệm Thiết Kế Web (English) - Bài 46
Trắc Nghiệm Thiết Kế Web Và Flash - Bài 01
Trắc Nghiệm Thiết Kế Web (English) - Bài 34
Trắc Nghiệm ASP.NET - Bài 02
Trắc Nghiệm Thiết Kế Web - Bài 15
Trắc nghiệm Ngôn Ngữ Lập Trình C++ - Bài 29
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 16
Trắc nghiệm Linux ( English ) - Bài 32
Trắc Nghiệm Thiết Kế Web Và Flash - Bài 10
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 04
Trắc Nghiệm Pascal - Bài 28
Trắc Nghiệm C Sharp - Bài 22
Trắc nghiệm Linux - Bài 47
Trắc Nghiệm Visual Basic - Bài 24
Trắc Nghiệm Thiết Kế Web (English) - Bài 08
Trắc Nghiệm Ngôn Ngữ Lập Trình C ( English ) - Bài 55
Trắc Nghiệm Thiết Kế Web - Bài 20
Trắc Nghiệm Thiết Kế Web (English) - Bài 31
Trắc Nghiệm C Sharp - Bài 17
Phát triển hệ thống: TRƯƠNG HỮU ĐỨC - Phiên bản 3.0 - © Copyright 2013 - 2024 - VNEDU.ORG

free counters