Chandu yadav has Published 1163 Articles

What does the interface ICloneable do in C#?

Chandu yadav

Chandu yadav

Updated on 20-Jun-2020 15:22:00

2K+ Views

The ICloneable interface creates a copy of the exisiting object i.e a clone.It only has a single method −Clone() − The clone() method creates a new object that is a copy of the current instance.The following is an example showing how to perform cloning using Icloneable interface −Example Live Demousing System; ... Read More

How to destroy threads in C#?

Chandu yadav

Chandu yadav

Updated on 20-Jun-2020 15:12:48

537 Views

The Abort() method is used for destroying threads.The runtime aborts the thread by throwing a ThreadAbortException. This exception cannot be caught, the control is sent to the finally block, if any.The following is an example showing how to destroy threads −Example Live Demousing System; using System.Threading; namespace MultithreadingApplication {    class ThreadCreationProgram ... Read More

How to declare a tuple in C#?

Chandu yadav

Chandu yadav

Updated on 20-Jun-2020 14:57:34

389 Views

To declare a tuple the following is the format wherein we have a tuple with int and string items −Tuple tuple = new Tuple(20, "Tom");Now, check for first item in the tuple, which is an integer −if (tuple.Item1 == 99) {    Console.WriteLine(tuple.Item1); }Now check for second item in the ... Read More

IS vs AS Operators in C#

Chandu yadav

Chandu yadav

Updated on 20-Jun-2020 14:51:34

856 Views

IS operatorThe "is" operator in C# checks whether the run-time type of an object is compatible with a given type or not.The following is the syntax −expr is typeHere, expr is the expressiontype is the name of the typeThe following is an example showing the usage of is operator in ... Read More

Transform the element along with x-axis and y-axis with CSS

Chandu yadav

Chandu yadav

Updated on 20-Jun-2020 14:44:07

1K+ Views

Use the translate(x, y) method to transform the element along with x-axis and y-axis.Let us see the syntaxtranslate(x, y)Here, x is a length representing the x-coordinate of the translating vector.y is a length representing the ordinate of the translating vectorLet us see an examplediv {    width: 50px;    height: ... Read More

What is garbage collection in C#?

Chandu yadav

Chandu yadav

Updated on 20-Jun-2020 14:40:47

9K+ Views

The garbage collector (GC) manages the allocation and release of memory. The garbage collector serves as an automatic memory manager.You do not need to know how to allocate and release memory or manage the lifetime of the objects that use that memory.An allocation is made any time you declare an ... Read More

In MySQL, how can I combine two or more strings along with a separator?

Chandu yadav

Chandu yadav

Updated on 20-Jun-2020 13:50:36

98 Views

In MySQL, we can combine two or more strings along with a separator by using CONCAT_WS() function. The syntax of this function is CONCAT_WS(Separator, String1, String2, …, StringN)Here, the arguments of CONCAT_WS functions are Separator and the strings which need to be concatenated along with that separator as a single ... Read More

Break the line and wrap onto next line with CSS

Chandu yadav

Chandu yadav

Updated on 20-Jun-2020 13:47:20

689 Views

Use the word-wrap property to break the line and wrap onto next line. You can try to run the following code to implement a word-wrap property in CSSExampleLive Demo                    div {             width: 200px; ... Read More

What does Array.IsFixedSize property of array class do in C# ?

Chandu yadav

Chandu yadav

Updated on 20-Jun-2020 13:23:53

191 Views

The IsFixedSize property of ArrayList class is used to get a value indicating whether the ArrayList has a fixed size.The following is an example stating the usage of isFixedSize property −Example Live Demousing System; using System.Collections; class Demo {    public static void Main() {       ArrayList arrList ... Read More

What are user defined data types in C#?

Chandu yadav

Chandu yadav

Updated on 20-Jun-2020 13:16:48

2K+ Views

The User defined data types in C# are structures and enumeration.StructureIn C#, a structure is a value type data type. It helps you to make a single variable hold related data of various data types. The struct keyword is used for creating a structure.The C# structures have the following features ... Read More

Advertisements