内射老阿姨1区2区3区4区_久久精品人人做人人爽电影蜜月_久久国产精品亚洲77777_99精品又大又爽又粗少妇毛片

如何使用CSC.exe將module組合成assembly-創(chuàng)新互聯(lián)

小編給大家分享一下如何使用CSC.exe將module組合成assembly,相信大部分人都還不怎么了解,因此分享這篇文章給大家參考一下,希望大家閱讀完這篇文章后大有收獲,下面讓我們一起去了解一下吧!

成都創(chuàng)新互聯(lián)從2013年創(chuàng)立,是專業(yè)互聯(lián)網(wǎng)技術(shù)服務(wù)公司,擁有項目網(wǎng)站建設(shè)、網(wǎng)站制作網(wǎng)站策劃,項目實施與項目整合能力。我們以讓每一個夢想脫穎而出為使命,1280元湘鄉(xiāng)做網(wǎng)站,已為上家服務(wù),為湘鄉(xiāng)各地企業(yè)和個人服務(wù),聯(lián)系電話:028-86922220

1、新建一個FrequentlyUsedCalculator.cs文件

代碼如下:

using System;

namespace MyClassLib
{
    public class FrequentlyUsedCalculator
    {
        public int Add(int a, int b)
        {
            return a + b;
        }

        public int Sub(int a, int b)
        {
            return a - b;
        }
    }
}

2、對FrequentlyUsedCalculator.cs文件進(jìn)行編譯

csc.exe /t:module FrequentlyUsedCalculator.cs

3、新建一個RarelyUsedCalculator.cs文件

代碼如下:

using System;

namespace MyClassLib
{
    public class RarelyUsedCalculator
    {
        public int Multiple(int a,int b)
        {
            return a * b;
        }

        public int Divide(int a, int b)
        {
            return a / b;
        }
    }
}

4、對RarelyUsedCalculator.cs文件進(jìn)行編譯

csc.exe /t:module RarelyUsedCalculator.cs

如何使用CSC.exe將module組合成assembly

5、將module文件合并成assembly文件

al.exe /out:MyClassLib.dll /t:library FrequentlyUsedCalculator.netmodule RarelyUsedCalculator.netmodule

如何使用CSC.exe將module組合成assembly

6、新建一個Program.cs文件

using System;
using MyClassLib;

namespace MyConsoleApp
{
    class Program
    {
        static void Main(string[] args)
        {
            Console.Write("請輸入第一個整數(shù):");
            int number1 = Convert.ToInt32(Console.ReadLine());
            Console.Write("請輸入第二個整數(shù):");
            int number2 = Convert.ToInt32(Console.ReadLine());
            FrequentlyUsedCalculator cal1 = new FrequentlyUsedCalculator();
            Console.WriteLine("{0} + {1} = {2}", number1, number2, cal1.Add(number1, number2));
            Console.WriteLine("{0} - {1} = {2}", number1, number2, cal1.Sub(number1, number2));
            RarelyUsedCalculator cal2 = new RarelyUsedCalculator();
            Console.WriteLine("{0} * {1} = {2}", number1, number2, cal2.Multiple(number1, number2));
            Console.WriteLine("{0} / {1} = {2}", number1, number2, cal2.Divide(number1, number2));
            Console.ReadKey();
        }
    }
}

7、對Program.cs進(jìn)行編譯

csc.exe /out:Program.exe /t:exe /r:MyClassLib.dll Program.cs

如何使用CSC.exe將module組合成assembly

8、運行結(jié)果

如何使用CSC.exe將module組合成assembly

以上是“如何使用CSC.exe將module組合成assembly”這篇文章的所有內(nèi)容,感謝各位的閱讀!相信大家都有了一定的了解,希望分享的內(nèi)容對大家有所幫助,如果還想學(xué)習(xí)更多知識,歡迎關(guān)注創(chuàng)新互聯(lián)網(wǎng)站制作公司行業(yè)資訊頻道!

創(chuàng)新互聯(lián)www.cdcxhl.cn,專業(yè)提供香港、美國云服務(wù)器,動態(tài)BGP最優(yōu)骨干路由自動選擇,持續(xù)穩(wěn)定高效的網(wǎng)絡(luò)助力業(yè)務(wù)部署。公司持有工信部辦法的idc、isp許可證, 機(jī)房獨有T級流量清洗系統(tǒng)配攻擊溯源,準(zhǔn)確進(jìn)行流量調(diào)度,確保服務(wù)器高可用性。佳節(jié)活動現(xiàn)已開啟,新人活動云服務(wù)器買多久送多久。

網(wǎng)站欄目:如何使用CSC.exe將module組合成assembly-創(chuàng)新互聯(lián)
轉(zhuǎn)載來源:http://www.rwnh.cn/article46/hcjhg.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供網(wǎng)站改版網(wǎng)站制作、定制網(wǎng)站、網(wǎng)站內(nèi)鏈、App開發(fā)、全網(wǎng)營銷推廣

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

h5響應(yīng)式網(wǎng)站建設(shè)
桂平市| 延川县| 酒泉市| 厦门市| 沙雅县| 望谟县| 驻马店市| 思南县| 昭平县| 共和县| 咸宁市| 资兴市| 年辖:市辖区| 岗巴县| 历史| 清徐县| 南和县| 杨浦区| 通州市| 信丰县| 许昌市| 运城市| 成都市| 油尖旺区| 万山特区| 旌德县| 东乌| 那坡县| 河南省| 平原县| 海口市| 紫金县| 盈江县| 纳雍县| 彰化县| 敦化市| 大化| 辽源市| 栾川县| 唐河县| 白山市|