VB.Net 中带有委托的文本字符串
我的 VB.Net 编程课程分配了以下项目:
“使用各种过程编写一个程序来执行下面列出的操作。使用委托调用这些过程。确保记录您的程序并让程序打印描述性文本以及b 和 c 中的数字
a) Print a text string in reverse word order.
b) Print the number of characters in the string.
c) Print number of words in the string."
现在提出了一些关于我应该如何完成作业的问题(其中一些是基于意见的),
你们认为我的老师所说的“反向词”是什么意思 。 order"?它们的意思是打印文本字符串随着单词组合向后(即“siht si a ecnetnes”),它们是否意味着打印整个单词向后的文本字符串(即“句子a是这个”),或者它们是否同时意味着两者(即“ecnetnes” a si siht")?这是基于意见的问题之一,但我只是想听听你们的想法。
其次,生成字符串中字符数的语法是什么?我已经知道获取字符串所需的代码数量话,但是这个作业的 b 部分让我有点困惑。任何帮助将不胜感激。
I was assigned the following project for my VB.Net programming course:
"Write a program using various procedures to perform the operations listed below. Call these procedures using delegates. Make sure to document your program and have the program print descriptive text along with the numbers in b. and c.
a) Print a text string in reverse word order.
b) Print the number of characters in the string.
c) Print number of words in the string."
Now this raises a couple of questions that I have (some of which are opinion-based) relating to how I should complete the assignment.
First off, what do you guys think my teacher means by "reverse word order"? Do they mean print a text string with the word compositions going backwards (i.e. "siht si a ecnetnes"), do they mean print a text string with the whole words going backwards (i.e. "sentence a is this"), or do they mean both at once (i.e. "ecnetnes a si siht")? This is one of the opinion-based questions, but I just wanted your guys' thoughts.
Secondly, what is the syntax to produce the number of characters in a string? I already know the code necessary to get the number of words, but part b of this assignment is confusing me slightly. Any help would be greatly appreciated.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
对于你的第二个问题,产生字符串中字符数的语法是:
正如我在评论中提到的,我对你的第一个问题的猜测是老师想要颠倒单词,而不是字符,所以“这是一个句子” 会反向显示为“句子 a 是这个”
For your second question, the syntax to produce the number of characters in a string is:
As I mentioned in my comments, my guess for your first question is that the teacher wants the words reversed, not the characters, so "this is a sentence" would appear in reverse as "sentence a is this"
快速浏览了一下,因为它听起来很有趣。
Had a quick go at this because it sounded interesting.