哪个是连接大块文本的更好方法? [英] Which is a better method to concatenate large blocks of text?

查看:61
本文介绍了哪个是连接大块文本的更好方法?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在Windows窗体应用程序中,哪种方法可以更好地连接

大块代码?


1.从文本文件中读取文本。

2.将文本添加到VB文件本身?


谢谢!

JS


-

In a Windows Form application, which is the better method to concatenate
large blocks of code?

1. Reading the text from text files.
2. Adding the text to the VB file itself?

Thanks!
J.S.

--

推荐答案

JS
J.S.
在Windows窗体应用程序中,哪个更好连接大块代码的方法?


您能用更多的代码来解释更多代码吗?

1.从文本文件中读取文本。
2.添加文本到VB文件本身?
In a Windows Form application, which is the better method to concatenate
large blocks of code?
Can you explain more with concatentate large blocks of code?

1. Reading the text from text files.
2. Adding the text to the VB file itself?



这取决于你在做什么,你甚至可以通过实例添加来自数据库的

文本。


Cor


That depends on what you are doing, you can even add by instance adding the
text from a database.

Cor


>你可以用连续的大块代码解释更多吗?


我试图用VB 2005 beta创建一个Windows应用程序,它有一个带有一些文本框的表格

。在文本框中输入的值是变量

我想与其他一些代码块(我有)集成,以便为另一个应用程序生成代码。因此,基于将一些代码块(例如,ASP代码)与用户输入的变量值连接起来的代码块(例如,ASP代码),这样生成的代码将是

。我已经设法做到这两个方式 - 通过在VB文件中插入代码块,并从我的外部文本文件中拉出

代码块计算机。


我的问题是:这些方法中哪一种方法更好,而b / b $ b&b最佳实践立场?如果我将所有代码集成到VB文件中

那么用户只需要一个.exe文件来处理我的应用程序。如果我从外部文本文件中提取代码块,那么当我的程序集解压缩时,我必须在他们的计算机上创建文本

文件。 br />
> Can you explain more with concatentate large blocks of code?

I am trying to create a Windows application in VB 2005 beta that has a form
with some textboxes. The values entered in the textboxes are variables
which I want to integrate with some other blocks of code (which I have) to
generate code for another application. So the code thus generated would be
based on concatenating some blocks of code (say for example, ASP code) with
the variable values entered by the users. I have managed to do this two
ways - by inserting the blocks of code also in the VB file, and by pulling
the blocks of code from external text files on my computer.

My question is: which of these methods is better from a performance and
"best practices" standpoint? If I integrate all the code into the VB file
then users will just need an .exe file to work with my application. If I
pull blocks of code from external text files then I''ll have to create text
files on their computers as well when my assembly is unzipped by them.
这取决于你在做什么,你甚至可以通过实例添加
来自数据库的文本。
That depends on what you are doing, you can even add by instance adding
the text from a database.




你是对的;在许多情况下,数据库将是一个很好的方法。但是,在这个

应用程序中,我宁愿使用上述方法之一,除非

是不这样做的重要原因。我在一个

方法中使用文本文件的原因是因为我不知道我是否可以将文本文件转换为一些

类二进制文件并且仍然是通过我的申请阅读。


感谢您的帮助;我是一个完全新手。


JS



You are right; a database would be a good method in many instances. In this
application, however, I''d rather use one of the above methods unless there
are significant reasons not to do so. The reason I use text files in one
method is because I don''t know if I could convert the text files into some
kind of binary and still have it be read by my application.

Thanks for your help; I am a complete newbie at this.

J.S.


JS


我肯定不会用exe文件来做。如果您没有问题,那么用户可以看到该文件,而不是可能(如果我理解你的话),我会为了获取XML数据集而使用
,因为这很糟糕易于处理。


在VB 2005中也应该可以直接使用数据表XML

这个


我希望这会有所帮助。


Cor
J.S.

I definitly would not do it with the exe file. If you have no problem that
the user can see the file, than probably (if I understand you well), I would
go for the XML dataset because that is terrible easy to handle.

In VB 2005 it should also be possible to use direct the datatable XML for
this

I hope this helps.

Cor


这篇关于哪个是连接大块文本的更好方法?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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