```c#
Random random = new Random();
return string.Format("{0}{1}:{2}{3}:{4}{5}:{6}{7}:{8}{9}:{10}{11}", new object[]
{
random.Next(0, 16).ToString("x"),
"6",
random.Next(0, 16).ToString("x"),
random.Next(0, 16).ToString("x"),
random.Next(0, 16).ToString("x"),
random.Next(0, 16).ToString("x"),
random.Next(0, 16).ToString("x"),
random.Next(0, 16).ToString("x"),
random.Next(0, 16).ToString("x"),
random.Next(0, 16).ToString("x"),
random.Next(0, 16).ToString("x"),
random.Next(0, 16).ToString("x")
}).ToLower();
```
<a href="/user/nezhang" title="@nezhang">@nezhang</a> 嗯谢谢了, 不知道fmt.printf有什么可以代替格式化 我需要return到http里去, 但是这个包只能在命令里输出
#6
更多评论
<a href="/user/hshd123" title="@hshd123">@hshd123</a> 是生成一组随机数字 mac,转换16进制
#2