What happens if you add duplicate elements to a set?



What happens if you add duplicate elements to a set?..

Answer / Upendra

When you add duplicate elements to a Set in C#, the Set will automatically remove any duplicates. This is because Sets are designed to only contain unique elements.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More C Sharp Interview Questions

Define mutex in C#?

1 Answers  


Is boxing an implicit conversion?

1 Answers  


What does convert toint32 mean?

1 Answers  


Can we have only “try” block without “catch” block in c#?

1 Answers  


What is a private class in c#?

1 Answers  


How to do and Apply Themes to Datagrid,Lable,Textbox,etc., in C#.NET 2005 Windows Application? (like who we will do themes in ASP.NET using .CSS and .SKIN files). Urgent!!

1 Answers  


Can you declare struct members as protected?

1 Answers  


Explain the difference between event and a delegate in c#?

1 Answers   DELL,


what is overloading & overriding

3 Answers   Fulcrum Logic, Synergy,


why we can't create an object for a static class?? what is the reason behind this?

4 Answers   HCL,


What is the functionality of break and continue in Visual Studio?

2 Answers   JPMorgan Chase,


What is the benefit of using interface in c#?

1 Answers  


Categories