在C#汇编上使用C ++反射? [英] Use C++ reflection on C# assembly?

查看:105
本文介绍了在C#汇编上使用C ++反射?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

问候,全部.如果我有C#程序集,是否可以在C ++中使用反射来访问该程序集中的类型/属性信息?在不泄露过多信息的情况下,我正在一个项目中工作,在该项目中我们创建了多个C#表单,然后我们需要使用C ++生成.ini文件,其中包含每个表单元素(标签,链接标签,图片框,等.)现在,我们正在逐行分析Designer.cs文件,以提取有关每个元素的信息,这是一个混乱的文件(我没有写),而我我试图找到一个更容易/更好/更有效的解决方案.我认为,如果将这些C#文件编译为一个程序集,则可以使用反射来获取信息,而不是逐行解析文件.

如果对此有任何解决方案,我将不胜感激提供的任何信息.非常感谢.

James


认证初学者

Greetings, all.  If I have a C# assembly, can I use reflection in C++ to access type/property information in that assembly?  Without divulging too much information, I am working on a project at work where we have several C# forms that are created, and then we need to use C++ to generate .ini files with information on each form element (labels, linklabels, picture boxes, etc.).

Right now, we are parsing through the Designer.cs file line by line extracting information on each element, and it's a mess of a file (I didn't write it), and I'm trying to find an easier/better/more efficient solution.  I figured that if these C# files were compiled into an assembly, I could use reflection to get the information instead of parsing the file line by line.

If there is any solution to this, I would be greatly appreciative of any information provided.  Thanks much.

James


Certification Beginner

推荐答案

您可以使用applicationsettings将表单/控件属性绑定到设置,然后改为修改设置.
You can use applicationsettings to bind form/control properties to settings, then modify the settings instead.


这篇关于在C#汇编上使用C ++反射?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆