国产精品天干天干,亚洲毛片在线,日韩gay小鲜肉啪啪18禁,女同Gay自慰喷水

歡迎光臨散文網(wǎng) 會員登陸 & 注冊

類和類的引用5

2023-02-12 11:57 作者:此城過客  | 我要投稿

namespace ConsoleApp2//主函數(shù)

{

? ? class Program

? ? {

? ? ? ? static void Main(string[] args)

? ? ? ? {

? ? ? ? ? ? Add ab = new Add();//引用加法類

? ? ? ? ? ? ab.a = 20;

? ? ? ? ? ? ab.b = 10;

? ? ? ? ? ? ab.Add1();


? ? ? ? ? ? Reduce ac = new Reduce();//引用減法類

? ? ? ? ? ? ac.a = 20;

? ? ? ? ? ? ac.b = 10;

? ? ? ? ? ? ac.Reduce1();

? ? ? ? ? ? Console.ReadKey();

? ? ? ? }

? ? }

}

============================================================

namespace ConsoleApp2

{

? ? class Add

? ? {

? ? ? ? public int a;//類的特征

? ? ? ? public int b;//類的特征

? ? ? ? public void Add1()

? ? ? ? {

? ? ? ? ? ? int ab = a + b;//類的邏輯,或者行為

? ? ? ? ? ? Console.WriteLine(ab);//類的邏輯,或者行為

? ? ? ? }

? ? }

}

============================================================

namespace ConsoleApp2

{

? ? class Reduce

? ? {

? ? ? ? public int a;//類的特征

? ? ? ? public int b;//類的特征

? ? ? ? public void Reduce1()

? ? ? ? {

? ? ? ? ? ? int ac = a * b;//類的邏輯,或者行為

? ? ? ? ? ? Console.WriteLine(ac);//類的邏輯,或者行為

? ? ? ? }

? ? }

}


類和類的引用5的評論 (共 條)

分享到微博請遵守國家法律
宜兰县| 永安市| 海原县| 东兰县| 行唐县| 丰顺县| 宿松县| 海城市| 社会| 城固县| 叙永县| 高安市| 凌源市| 高雄县| 禹州市| 昌黎县| 昌宁县| 东阳市| 刚察县| 靖安县| 汕头市| 客服| 郁南县| 延吉市| 丽江市| 古田县| 久治县| 牡丹江市| 称多县| 吉木萨尔县| 山丹县| 云和县| 色达县| 财经| 金华市| 合江县| 德昌县| 嘉义市| 会泽县| 社旗县| 双峰县|