vb中的with 在c#中类似写法

前端之家收集整理的这篇文章主要介绍了vb中的with 在c#中类似写法前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

vb code

dim u as new user;

with user

.id = 123456

.name = "Username"

.password = "pwd"

end with


C# code
User u = new User(){

id = 123456

name = "Username"

password = "pwd"

};//end with
原文链接:https://www.f2er.com/vb/260418.html

猜你在找的VB相关文章