return a struct object.

standlove 2004-03-08 12:13:29

When using a struct as the parameter of a function, maybe it's better to add ref modifier.
But when it is used as the return type, A copy of the struct is returned, the performance will be reduced because of it..

Is there any ways to realize a ref of struct is returned instead of a copy of it ?
...全文
47 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复

110,525

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧