using System;
using System.Collections.Generic;
using System.Linq;
using System.Globalization;
namespace tesitingInMyKitchen
{
class program
{
static string cheese = "chedar";
static void Main()
{
string cheese = "swiss";
//printing local cheese
Console.WriteLine(cheese);
//here want to print global cheese
Console.WriteLine(global :cheese);
}
}
}
Run Code Online (Sandbox Code Playgroud) 这是我的代码.我正在尝试使用比较委托进行比较.(在visual studio code .net core中).
using System;
using System.Collections.Generic;
namespace comparisionProject
{
public class student
{
public int SId { get; set; }
public string name { get; set; }
public int FullMarks { get; set; }=600;
public int Marks { get; set; }
}
public class tester
{
public static int CompareNames(student std1, student std2)
{
return std1.name.CompareTo(std1.name);
}
static void Main(string[] args)
{
student s1 = new student(){SId=101 , name = "kalu",Marks = 456 };
student s2 = …Run Code Online (Sandbox Code Playgroud)