-
-
which keywords can do case insensitive string comparison in c#?
string.Equals("string number 1", "String NUMBER 1", StringComparison.CurrentCultureIgnoreCase) There is also a similar override of String.Compare().
-
inheritance
what is the importance of inheritance in c# and why i used?
-
C# sealed variables
I have taken a windows application and a button control in it.I want to declare a variable as a sealed and use that variable with in same class as we cannot use in other class. class test { public sealed int x = 5; public void abc() { MessageBox.Show(x.ToString()); } } class best :test { ...
-
The following code fails. Why?
int a = 5; int b = 5; object oa = a; object ob = b; Debug.Assert(oa == ob, "oa is not equal ob");
-
-
-
-
-
-
-
How to implement multiple inheritence in C#
A) Using InterfaceB) Using Abstract classC) Using DelegatesD) Using Events
-
What happens if we refer a variable which in not initialized in C#
A) Compiler throws warning messageB) Compiler throws error messageC) Compiles the application with out any problemExplanation: Variable needs to be initialized before use
-
You can create the following using C#
Skill/Topic: BeginnerA) class librariesB) Stand alone GUI (Windows Forms) applicationsC) ASP.NET Web pagesD) Command Line applications
-
Does C# support properties of array types?
Yes. Here's a simple example: using System;class Class1 {private string[] MyField;public string[] MyProperty {get { return MyField; }set { MyField = value; }}}class MainClass{public static int Main(string[] args) {Class1 c = new Class1();string[] arr = new string[] {"apple", "banana"};c.MyProperty = arr;Console.WriteLine(c.MyProperty[0]); // "apple"return 0;}}