class Sample { private int i; public Single j; private void DisplayData() { Console.WriteLine(i + " " + j); } public void ShowData() { Console.WriteLine(i + " " + j); } }
public class MyContainer<T> where T: class, IComparable { //Insert code here }
namespace CuriousTabConsoleApplication { class SampleProgram { static void Main(string[] args) { int a = 5; int s = 0, c = 0; Proc(a, ref s, ref c); Console.WriteLine(s + " " + c); } static void Proc(int x, ref int ss, ref int cc) { ss = x * x; cc = x * x * x; } } }
if (age > 18 && no < 11) a = 25;
int i = 10; int j = 10;
int i, j; i = 10 : j = 10;
int i = 10, j = 10;
int i, j = 10;
int i = j = 10;
namespace CuriousTabConsoleApplication { public enum color { red, green, blue }; class SampleProgram { static void Main (string[ ] args) { color c = color.blue; switch (c) { case color.red: Console.WriteLine(color.red); break; case color.green: Console.WriteLine(color.green); break; case color.blue: Console.WriteLine(color.blue); break; } } } }
switch (id) { case 6: grp = "Grp B"; break; case 13: grp = "Grp D"; break; case 1: grp = "Grp A"; break; case ls > 20: grp = "Grp E"; break ; case Else: grp = "Grp F"; break; }
if (age > 18 || no < 11) a = 25;
fun(int i, Single j, double k) decimal
{ ... }
static decimal fun(int i, Single j, double k)
{ ... }
fun(int i, Single j, double k)
{
...
return decimal;
}
static decimal fun(int i, Single j, double k) decimal
{ ... }
if (Condition1)
{// Some statement}
if (Condition1) {// Some statement}
else {// Some statement}
if (Condition1) {// Some statement}
else {// Some statement}
else if ( Condition2){//Some statement}
if ( Condition1 ) {// Some statement}
else if ( Condition2 ) {// Some statement}
else {// Some statement}
if ( Condition1 ) {// Some statement}
else if ( Condition2 ) {// Some statement}
else if ( Condition3 ) {// Some statement}
else {// Some statement}
if (Condition1) {// Some statement}
else {// Some statement}
else if ( Condition2){//Some statement}
Comments
There are no comments.Copyright ©CuriousTab. All rights reserved.