Explain about 'this' and where and when it should be used?
Latest Answer: i. this keyword refer to current instance. ii.this keyword help to provide intellisense support during debugging. ...
What is a delegate in C# and when are they commonly used in Windows Forms programming?
Latest Answer: Delegeates are reference to methods Delegates are most commonly used in event handling. ...
Write a very simple multi threaded program in C#. 1. The program should create two threads that each add data to the same list at the same time. Then after they are both done, print out the entire list.
Latest Answer: See code below. In practice, the Thread.Sleep() is required - otherwise each thread will complete its work in a single time-slice before the other gets a chance to start. An improvement would be to create a "work item" class for the that would ...
The following code illustrates a situation where a boss wants to keep track of the work progress of its subordinates: using System;namespace BigCompany { public class Boss { public void WorkerPercentageDone(int
Latest Answer: public class Boss { public void WorkerPercentageDone(int percentage) { ...
. Below is a set of birds and movements they can perform. Birds:Penguin:• hopping: moves 2 ft• flying: can't flyHawk:• hopping: can't hop• flying: moves 100 ft; won't
Latest Answer: using System;using System.Collections.Generic;namespace PCD{ public class World { public static int temperature = 0; // celcius public ...
Assume you have large set of data, say more than 100,000 elements. Each data element has a unique string associated with it. 1. What data structure has the optimal algorithmic access time to any element
Latest Answer: 1) Hashtable 2) 0(n-1)3) An arraylist which contains keys to a hashtable which contains the data this covers all requirements. ...
What is wrong with the following C# code? It should take the given colors and subtract the given fadeValue and then print out the new faded values. Please copy and paste the code into your response and
Latest Answer: namespace PCD{ class MainClass { static void Main(string[] args) { int red=110; int green=220; int blue=230; getFadedColor(ref red, ref green, ref blue, 10); getFadedColor(ref red, ref green, ref blue, 20); Console.WriteLine("red: ...
Latest Answer: Fixed is used while doing type casting Fixed ensures that no exception will be thrown even if we are doing a wrong cast. ...
intushortdecimalenum
Latest Answer: sbyte(System.SByte)ushort(System.UInt16)uint(System.UInt32)ulong(System.UInt64)are non-cls compliant . ...
a)Instance equalsb)Static Equalsc)Instance referenceequalsd)Instance Gettype
Latest Answer: instance ReferenceEquals is not a memeber of Syste.Object.referenceEquals is static method of System.Object,so its not instance type in nature. ...
View page << Previous 1 2 [3] 4 5 6 7 8 9 10 Next >>

Go Top