当前位置:网站首页>[xlua notes] array of lua to array of C #
[xlua notes] array of lua to array of C #
2022-07-07 02:20:00 【Start()】
To C# Of string Group :
-- Pass in a Lua String group of
-- Return to one C# String group of
function GetStringList(var)
local count = #var
local lis = CS.System.Array.CreateInstance(typeof(CS.System.String),count)
for i=0,count-1 do
lis[i] = var[i+1]
end
return lis
end
To C# Of int Group :
-- Pass in a Lua Of int Group
-- Return to one C# Of int Group
function GetIntList(var)
local count = #var
local lis = CS.System.Array.CreateInstance(typeof(CS.System.Int32),count)
for i=0,count-1 do
lis[i] = var[i+1]
end
return lis
end
To C# Of float Group :
-- Pass in a Lua Of float Group
-- Return to one C# Of float Group
function GetFloatList(var)
local count = #var
local lis = CS.System.Array.CreateInstance(typeof(CS.System.Single),count)
for i=0,count-1 do
lis[i] = var[i+1]
end
return lis
end
Lua Group representation :
Group name = { Elements 1, Elements 2, Elements 3}
边栏推荐
- How to use strings as speed templates- How to use String as Velocity Template?
- FLIR blackfly s industrial camera: configure multiple cameras for synchronous shooting
- Freeswitch dials extension number source code tracking
- Metaforce force meta universe development and construction - fossage 2.0 system development
- Introduction to RC oscillator and crystal oscillator
- 传感器:土壤湿度传感器(XH-M214)介绍及stm32驱动代码
- 张平安:加快云上数字创新,共建产业智慧生态
- 6 seconds to understand the book to the Kindle
- centos8 用yum 安装MySQL 8.0.x
- 企业中台建设新路径——低代码平台
猜你喜欢

TiFlash 源码阅读(四)TiFlash DDL 模块设计及实现分析

Integrated navigation: product description and interface description of zhonghaida inav2

张平安:加快云上数字创新,共建产业智慧生态

ROS learning (26) dynamic parameter configuration

Cat recycling bin

go swagger使用

一片叶子两三万?植物消费爆火背后的“阳谋”

低代码平台中的数据连接方式(上)
![[unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files](/img/20/f7fc2204ca165dcea4af25cb054e9b.png)
[unity] upgraded version · Excel data analysis, automatically create corresponding C classes, automatically create scriptableobject generation classes, and automatically serialize asset files

MySQL execution process and sequence
随机推荐
leetcode:5. 最长回文子串【dp + 抓着超时的尾巴】
Word wrap when flex exceeds width
3D激光SLAM:Livox激光雷达硬件时间同步
2022 system integration project management engineer examination knowledge point: Mobile Internet
How do I dump SoapClient requests for debugging- How to dump SoapClient request for debug?
String or binary data will be truncated
A new path for enterprise mid Platform Construction -- low code platform
张平安:加快云上数字创新,共建产业智慧生态
Web开发小妙招:巧用ThreadLocal规避层层传值
TiFlash 源码阅读(四)TiFlash DDL 模块设计及实现分析
ROS learning (24) plugin
STM32F4---通用定时器更新中断
The mega version model of dall-e MINI has been released and is open for download
Date processing tool class dateutils (tool class 1)
Draco - glTF模型压缩利器
Ros Learning (23) Action Communication Mechanism
MetaForce原力元宇宙开发搭建丨佛萨奇2.0系统开发
Threadlocalutils (tool class IV)
Analyze "C language" [advanced] paid knowledge [II]
Blackfly s usb3 industrial camera: buffer processing