当前位置:网站首页>C function returns multiple value methods
C function returns multiple value methods
2022-07-05 10:14:00 【Little yellow man software】
Method 1 : intuitive
public (string gertec_code, string feitian_code,string part_name)getPartName(string feiTianCode)
{
if (feiTianCode.Equals("")) { return ("","",""); }
// use sn check csv Get other numbers
int row = 0;
for (row = 0; row < dt.Rows.Count; row++)
{
if (dt.Rows[row][0].ToString().Equals(feiTianCode) || dt.Rows[row][1].ToString().Equals(feiTianCode))
{
return (dt.Rows[row][0].ToString(), dt.Rows[row][1].ToString(), dt.Rows[row][2].ToString());
}
}
Log(" error In the material Excel No number found in :" + feiTianCode);
return ("", "", "");
}
call
// use sn check csv Get other numbers
var v=getPartName(textBoxSN1.Text);
string feiTianCode = v.feitian_code;
string gertecCode = v.gertec_code;
string partName = v.part_name;
similar MFC in void getPartName(CString code ,CString &outcode)
Method 2: All values encapsulate a class , Return class object .
Method 3: Global variables
wait .
Function directly with proxy
边栏推荐
- [C language] the use of dynamic memory development "malloc"
- 橫向滾動的RecycleView一屏顯示五個半,低於五個平均分布
- Tianlong Babu TLBB series - single skill group injury
- C#函数返回多个值方法
- Applet image height adaptation and setting text line height
- 天龙八部TLBB系列 - 单体技能群伤
- 剪掉ImageNet 20%数据量,模型性能不下降!Meta斯坦福等提出新方法,用知识蒸馏给数据集瘦身...
- 硬核,你见过机器人玩“密室逃脱”吗?(附代码)
- @SerializedName注解使用
- Glide advanced level
猜你喜欢
Usage differences between isempty and isblank
mysql80服务不启动
MySQL字符类型学习笔记
QT timer realizes dynamic display of pictures
isEmpty 和 isBlank 的用法区别
历史上的今天:第一本电子书问世;磁条卡的发明者出生;掌上电脑先驱诞生...
一个程序员的职业生涯到底该怎么规划?
Energy momentum: how to achieve carbon neutralization in the power industry?
(1) Complete the new construction of station in Niagara vykon N4 supervisor 4.8 software
如何写出高质量的代码?
随机推荐
Design and Simulation of fuzzy PID control system for liquid level of double tank (matlab/simulink)
最全是一次I2C总结
如何写出高质量的代码?
Kotlin Compose 与原生 嵌套使用
《剑来》语句摘录(七)
【系统设计】指标监控和告警系统
Click the picture in the mobile browser and the picture will not pop up
Personal website construction tutorial | local website environment construction | website production tutorial
一个程序员的职业生涯到底该怎么规划?
What is the origin of the domain knowledge network that drives the new idea of manufacturing industry upgrading?
(1) Complete the new construction of station in Niagara vykon N4 supervisor 4.8 software
Fluent generates icon prompt logo widget
自动化规范检查软件如何发展而来?
cent7安装Oracle数据库报错
Tianlong Babu TLBB series - single skill group injury
mongoDB副本集
Design of stepping motor controller based on single chip microcomputer (forward rotation and reverse rotation indicator gear)
【C语言】动态内存开辟的使用『malloc』
面试:Bitmap像素内存分配在堆内存还是在native中
Unity particle special effects series - the poison spray preform is ready, and the unitypackage package can be used directly - next