Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

C# .net network programming Which method is used to execute the code of a delega

ID: 3727680 • Letter: C

Question

C# .net network programming

Which method is used to execute the code of a delegate?

a)         Begin()

b)         Execute()

c)         Invoke()

d)         Start()

The finally block will always be executed, even if an exception has not occurred?

            True

            False

All interfaces must contain IComparable

            True

            False

Why should the System.Text.StringBuilder class be used when string values will change.

a)         Because strings are clones

b)         Because strings are clusters

c)         Because strings are inherited

d)         Because strings are immutable

A Virtual method can declared as "Private"

            True

            False

What method is used to clean up all resources used by the System.IO.StreamReader object.

a)         Close()

b)         Exit()

c)         Dispose()

d)         Terminate()

What does the following code do?

Bitmap myBmpObj = Bitmap.FromFile(strPath);

a)Reads in the given file and creates a bitmap object which can be displayed in a RichText control

b)Reads in the given file and creates a bitmap object which can be displayed in a PictureBox control

c)Reads in the given file and creates a bitmap object which can be displayed in a TextBox control

d)Reads in the given file and creates a bitmap object which can be displayed in a Form control

Explanation / Answer

Hi.. Please check below answers.

C# .net network programming questions

Which method is used to execute the code of a delegate?

a) Begin()

b) Execute()

c) Invoke()

d) Start()

Answer: Invoke() Method (c)

The finally block will always be executed, even if an exception has not occurred?

True

False

Answer: True

All interfaces must contain IComparable

True

False

Answer: False

Why should the System.Text.StringBuilder class be used when string values will change.

a) Because strings are clones

b) Because strings are clusters

c) Because strings are inherited

d) Because strings are immutable

Answer: d

Because strings are immutable

A Virtual method can declared as "Private"

True

False

Answer: False

What method is used to clean up all resources used by the System.IO.StreamReader object.

a) Close()

b) Exit()

c) Dispose()

d) Terminate()

Answer: d

Dispose().

What does the following code do?

Bitmap myBmpObj = Bitmap.FromFile(strPath);

a) Reads in the given file and creates a bitmap object which can be displayed in a RichText control

b) Reads in the given file and creates a bitmap object which can be displayed in a PictureBox control

c) Reads in the given file and creates a bitmap object which can be displayed in a TextBox control

d) Reads in the given file and creates a bitmap object which can be displayed in a Form control

Answer: c

Reads in the given file and creates a bitmap object which can be displayed in a TextBox control.

Please check above answers and let me know any issues. Thank you. All the best.