从字符串创建codeMemberMethod

编程入门 行业动态 更新时间:2024-10-27 13:22:35
本文介绍了从字符串创建codeMemberMethod的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想产生一些$ C C使用codeDOM $。我想知道是否有什么办法可以从字符串创建codeMemberMethod。 我发现了一个方法,但它产生的组装,从字符串。我想生成字符串的一些方法。有什么办法?

I am trying to generate some code using CodeDom. I wanted to know if there is any way to create CodeMemberMethod from a string. I found a method, but it generates assembly from string. I wanted to generate some methods from string. Is there any way?

推荐答案

嗯,我找到了答案。希望这可以帮助别人:

Well, I found the answer. Hope it may help someone else:

我们可以使用 codeSnippetStatement 来包括将包括直接在源代码无需修改code片段。

We can use CodeSnippetStatement to include code fragments that will be included directly in source without modification.

除此之外,还有 codeSnippetCompileUnit 将编译code单位的字符串。

In addition to that, there is CodeSnippetCompileUnit that will compile code units from string literal.

更多推荐

从字符串创建codeMemberMethod

本文发布于:2023-10-28 02:03:15,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1535177.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:字符串   codeMemberMethod

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!