// ex13Interest.h

#pragma once

using namespace System;

namespace ex13Interest {

    public ref class Interest
     {
         // TODO: 在此加入這個類別的方法。
         public:
             double CalInterest(double Balance, double InterestRate)
             {
                 return Balance*InterestRate/100;
             }
     };
}

編譯完成


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

使用上面產生的DLL檔案(C++/CLR專案產生)


加入參考, 主程式專案選擇x86

編譯並執行

文章標籤
全站熱搜
創作者介紹
創作者 me1237guy 的頭像
me1237guy

天天向上

me1237guy 發表在 痞客邦 留言(0) 人氣(890)