我在简单的文本输出报告中显示GUID和数字。我怎样才能保持每个字符串'固定'的长度。如何在.NET中将数字格式化为固定的字符串大小?
例如。目前,这是正在发生的事情。 (坏)。
[WaWorkerHost.exe] +-----------------------------------------------------------+
[WaWorkerHost.exe] + RavenDb Initialization Report +
[WaWorkerHost.exe] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +
[WaWorkerHost.exe] + o) Tenant Id: 50f1bf7f-7936-4aa9-aeca-e47b1d61bb85 +
[WaWorkerHost.exe] + o) Number of Documents: 87 +
[WaWorkerHost.exe] + o) Number of Indexes: 5 +
[WaWorkerHost.exe] + o) Number of ~Stale Indexes: 0 +
[WaWorkerHost.exe] +-----------------------------------------------------------+
和我后我...
[WaWorkerHost.exe] +-----------------------------------------------------------+
[WaWorkerHost.exe] + RavenDb Initialization Report +
[WaWorkerHost.exe] + ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +
[WaWorkerHost.exe] + o) Tenant Id: 50f1bf7f-7936-4aa9-aeca-e47b1d61bb85 +
[WaWorkerHost.exe] + o) Number of Documents: 87 +
[WaWorkerHost.exe] + o) Number of Indexes: 5 +
[WaWorkerHost.exe] + o) Number of ~Stale Indexes: 0 +
[WaWorkerHost.exe] +-----------------------------------------------------------+
喝彩!
(注:GUID是一个固定的长度,使线路具有“硬编码的”空间
OMG。这是一个尴尬和尴尬的时刻。 – 2013-05-06 04:34:09