五月天青色头像情侣网名,国产亚洲av片在线观看18女人,黑人巨茎大战俄罗斯美女,扒下她的小内裤打屁股

歡迎光臨散文網(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的評論 (共 條)

分享到微博請遵守國家法律
历史| 大同县| 尉犁县| 化州市| 承德县| 永善县| 淮北市| 宜州市| 牡丹江市| 临洮县| 古田县| 宣武区| 耿马| 怀化市| 遂平县| 聂拉木县| 沁阳市| 泸溪县| 仙游县| 左云县| 丰县| 临泽县| 灵川县| 定结县| 新龙县| 高州市| 大名县| 丰台区| 西安市| 修水县| 衡山县| 休宁县| 麻江县| 三河市| 霞浦县| 怀柔区| 江口县| 菏泽市| 阿拉尔市| 萨嘎县| 扎赉特旗|