1. In Playland example project, there is: myImage.Source = myBitmapImage; myImag
ID: 3856943 • Letter: 1
Question
1. In Playland example project, there is:
myImage.Source = myBitmapImage;
myImage.Source property is System.Windows.Media.ImageSource type. ImageSource class is an abstract class, and abstract class cannot be instantiated. So this line of code is incorrect.
2. mutex cannot be released once it's acquired by one thread.
3. To initialize a BitmapImage created using constructor public BitmapImage (), you must perform property initialization between BeginInit (Links to an external site.)Links to an external site.and EndInit (Links to an external site.)Links to an external site. calls.
4.
In public Thread(ThreadStart start), ThreadStart is:
5. Once a thread is aborted, it cannot be restarted.
6. Child elements of a Canvas are positioned at their designated coordinates, are not resizable.
TrueExplanation / Answer
1.answer: answer is True
explanation: we cannot create object for abstract class means abstract class cannot be instantiated
2.answer: False
explanation: a single thread acquires the lock on a resource so it can manipulate it and then, when it's finished, it releases that lock so that other threads may lock it.
3.answer: True
explanation: inorder to use BitmapImage created using constructor public BitmapImage ()
we have to write image.begininit() and after do bitmap image.endinit()
4.answer: correct answer is thread
explanation: To create a thread, instantiate an object of type Thread, which is a class defined in System.Threading. The simplest Thread constructor is shown here:
public Thread(ThreadStart start)
Here, start specifies the method that will be called to begin execution of the thread or we can say it specifies the thread’s entry point.
5.answer: False
explanation: once a thread has aborted it cannor restart automatically we need to implement some methods as:
By adding Mythread=new(Myfunction)before calling MyThread.start in doStart()
6.answer: True
Explanation: Child elements of a Canvas are never resized, they are just positioned at their designated coordinates
Related Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.