下一行的用途是什么.. [英] What is the use of following line ..

查看:84
本文介绍了下一行的用途是什么..的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

下面一行的用法是什么..

myBuilder.Append(Guid.NewGuid().ToString());

解决方案

在这一行的第一部分(Guid.NewGuid().ToString())创建一个新的GUID(全局唯一)标识符),然后将其转换为字符串.
第二部分(myBuilder.Append)将此Guid附加到字符串构建器实例中的文本.


我认为myBuilder是StringBuilder类型变量,并且将Globally Unique Identifier附加到它.


blockquote>

此代码将GUID值附加到StringBuilder,其即时名称为:myBuildert名称为:myBuilder


What is the use of following line ..

myBuilder.Append(Guid.NewGuid().ToString());

解决方案

In this line the first part (Guid.NewGuid().ToString()) creates a new GUID (globally unique identifier) and then converts it to a string.
The second part(myBuilder.Append) appends this guid to text in a string builder instance.


I think myBuilder is a StringBuilder type variable and you append the Globally Unique Identifier to it.


This code appends a GUID value to the StringBuilder which its instant name is : myBuildert name is : myBuilder


这篇关于下一行的用途是什么..的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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