返回客户是什么意思?
“返回客户”是什么意思?
我的老师在作业中要求编写一个返回日期和客户的方法。这是她的确切措辞:
“您还应该重写 ToString 方法,以返回日期和客户端。(DateTime 定义了合理的 ToString 方法。使用它。)我发现使用“\t”(制表符)有助于”
我不确定她说要归还客户时在问什么。我知道如何返回日期。谢谢。
What does it mean to "return the client?"
My teacher asked in an assignment to write a method that will return the date and the client. Here is her exact wording:
" You should also override the ToString method, to return the date and the client. (DateTime has a reasonable ToString method defined. Use it.) I found using "\t" (the tab symbol) helpful in lining up columns. "
I'm not sure what she is asking when she says to return the client. I understand how to return the date. Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
也许你应该问她。
在工作世界中,您需要从客户那里获得尽可能多的关于可交付成果的说明。
Maybe you should ask her.
In the working world you'll want to get as much clarification from your customer on the deliverables as required.
也许她的意思是客户端(函数的调用者?)
如果您的对象中有其他数据,也许她希望您以某种方式返回它(而不是默认的 ToString() 行为?
maybe she meant to the client (the caller of the function ?)
if you have other data in your object, maybe she wants you to return it in a certain way (and not the default ToString() behaviour ?
也许客户端就是您使用 ToString 的对象。
像 intSomeInteger.ToString
Maybe the client is the object you use ToString on.
Like intSomeInteger.ToString
可能是一个拼写错误 - 也许不是“返回日期和客户”,她的意思是“将日期返回给客户”?
Might be a typo -- maybe instead of "return the date and the client" she meant "return the date to the client"?
我的猜测是您有一个包含 DateTime 和 Client 的类,如下所示:
然后任务是将 MyClass.ToString() 和可能的 Client.ToString() 重写为如下所示:
My guess is you have a class containing a DateTime and a Client, something like:
The task would be then to override MyClass.ToString() and probably Client.ToString() to something like: