- Can we Declare non static methods in static class?
- No we can't declare non static methods in static class
- Can we Declare static methods in Non static class?
- Yes we can declare non static methods in static class.
public class MyStaticClass
{
public static int cnt = 0;
public int cv = 0;
public int add(int a,int b)
{
return a + b;
}
public static int add1(int a, int b)
{
return a+b;
}
}
class Program
{
static void Main(string[] args)
{
int a = 0;
int b = 0;
MyStaticClass obj = new MyStaticClass();
b=MyStaticClass.add1(2, 3);
a= obj.add(3, 5);
Console.WriteLine(a);
Console.WriteLine(b);
Console.ReadLine();
}
}
- Given number is prime number or not?
- Reverse a number in c# code?
- how to change first letter as capital one in sql
- What is collation?Collation refers to a set of rules that determine how data is sorted and compared. Character data is sorted using rules that define the correct character sequence, with options for specifying case-sensitivity, accent marks, kana character types and character width.
How to remove duplicate records in sql.
With CTE_Duplicates as (select empid,name , row_number() over(partition by empid,name order by empid,name ) rownumber from EmpDup ) delete from CTE_Duplicates where rownumber!=1
At a time 10 members sends a request to IIS then How IIS is able to find which request is which person?
No comments:
Post a Comment