class Program {
static void Main(string[] args) {
String a = "Hello World";
int x = a.IndexOf('o');
int y = a.LastIndexOf('l');
Console.WriteLine(x + " " + y);
}
}
public class Program {
public static void Main(string[] args) {
string a1 = "ollA";
string a2 = "olla";
if (a1 == a2)
Console.WriteLine("Equal");
else
Console.WriteLine("Unequal");
if (a1.Equals(a2))
Console.WriteLine("Equal");
else
Console.WriteLine("Unequal");
}
}
class MyClass {
public int x1;
public int x2;
public MyClass(int i, int j) {
x1 = i;
x2 = j;
}
public void calculate(MyClass o) {
o.x1 *= 2;
o.x2 /= 2;
}
}
class Program {
static void Main(string[] args) {
MyClass obj = new MyClass(10, 20);
obj.calculate(obj);
Console.WriteLine(obj.x1 + " " + obj.x2);
}
}