zoukankan
html css js c++ java
接口的使用
好长时间没用了.今年看 petshop 都有点快忘了.....
Account.cs
using
System;
using
System.Reflection;
using
System.Configuration;
namespace
Z_Petshop
{
/**/
///
<summary>
///
Account 的摘要说明。
///
</summary>
public
class
Account
{
public
int
SignIn(
string
userId,
string
password)
{
if
((userId.Trim()
==
string
.Empty)
||
(password.Trim()
==
string
.Empty))
return
10
;
IAccount dal
=
(IAccount)Assembly.Load(
"
Z_Petshop
"
).CreateInstance (
"
Z_Petshop.
"
+
"
Class_Account
"
);
int
account
=
dal.SignIn(userId, password);
return
account;
}
}
}
Class_Account.cs
using
System;
namespace
Z_Petshop
{
/**/
///
<summary>
///
Class_Account 的摘要说明。
///
</summary>
public
class
Class_Account : IAccount
{
public
int
SignIn(
string
userId,
string
password)
{
return
100
;
}
}
}
IAccount.cs
using
System;
namespace
Z_Petshop
{
/**/
///
<summary>
///
Iaccount 的摘要说明。
///
</summary>
public
interface
IAccount
{
int
SignIn(
string
userId,
string
password);
}
}
调用页面
private
void
Page_Load(
object
sender, System.EventArgs e)
{
//
在此处放置用户代码以初始化页面
Account s
=
new
Account ();
int
I
=
s.SignIn (
"
100
"
,
"
100
"
);
this
.Response .Write (I);
}
查看全文
相关阅读:
python yaml文件数据按原有的数据顺序dump
HTMLTestRunner
os.path获取当前路径及父路径
update 字符串拼接
VSCode 快速生成.vue基本模板、发送http请求模板
Vue取消eslint语法限制
node-sass安装失败解决方法
docker 创建mysql和redis
阿里云镜像加速器地址
.net core + xunit 集成测试
原文地址:https://www.cnblogs.com/gwazy/p/154135.html
最新文章
获小黄衫有感
个人作业——软件工程实践总结&个人技术博客
Spring Boot框架技术总结
个人作业——软件评测
结对第一次—某次疫情统计可视化(原型设计)
寒假作业(2/2)——疫情统计
寒假作业(1/2)
软工实践寒假作业(1/2)
公告
solr学习(一)安装与部署
热门文章
idea打开eclipse项目并部署至tomcat
什么是IOC
亚航app航班价格抓取
大麦网购票插件开发
淘宝直播数据采集系统
淘宝sign参数生成算法
某宝app抓包插件编写
淘口令解析
淘宝直播python爬虫
某宝直播协议分析
Copyright © 2011-2022 走看看