C#/.NET实例代码
using System;namespace yiibai {class Student {private string code = N.A;private string name = not known;
发布时间:2023-10-11
using System;namespace BoxApplication {class Box {public double length;// Length of a boxpublic double breadth;// Breadth of a box
发布时间:2023-10-11
using System;struct Books {private string title;private string author;private string subject;private int book_id;
发布时间:2023-10-11
using System;struct Books {public string title;public string author;public string subject;public int book_id;
发布时间:2023-10-11
using System;namespace BoxApplication {class Box {private double length;// Length of a boxprivate double breadth;// Breadth of a box
发布时间:2023-10-11
using System;namespace LineApplication {class Line {private double length;// Length of a linepublic Line() {
发布时间:2023-10-11
using System;namespace LineApplication {class Line {private double length;// Length of a linepublic Line(double len) {//Parameterized constructor
发布时间:2023-10-11
using System;namespace StaticVarApplication {class StaticVar {public static int num;public void count() {
发布时间:2023-10-11
using System;namespace InheritanceApplication {class Shape {public void setWidth(int w) {width = w;}public void setHeight(int h) {
发布时间:2023-10-11
using System;namespace RectangleApplication {class Rectangle {//member variablesprotected double length;
发布时间:2023-10-11
using System;namespace StaticVarApplication {class StaticVar {public static int num;public void count() {
发布时间:2023-10-11
using System;namespace OperatorOvlApplication {class Box {private double length;// Length of a boxprivate double breadth;// Breadth of a box
发布时间:2023-10-11
using System;namespace OperatorOvlApplication {class Box {private double length;// Length of a boxprivate double breadth;// Breadth of a box
发布时间:2023-10-11
using System;namespace PolymorphismApplication {abstract class Shape {public abstract int area();}class Rectangle:Shape {
发布时间:2023-10-11
using System;namespace PolymorphismApplication {class Printdata {void print(int i) {Console.WriteLine(Printing int: {0}, i );
发布时间:2023-10-11