From 82512ad3eb42529c5bd8e20062837ae3c19683a4 Mon Sep 17 00:00:00 2001 From: Doug MacEachern Date: Fri, 17 Sep 2004 22:58:50 +0000 Subject: [PATCH] use FormatSize --- bindings/dotnet/examples/Df.cs | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/bindings/dotnet/examples/Df.cs b/bindings/dotnet/examples/Df.cs index 605890dd..8860776b 100644 --- a/bindings/dotnet/examples/Df.cs +++ b/bindings/dotnet/examples/Df.cs @@ -3,6 +3,10 @@ using Hyperic.Sigar; public class Df { + private static String FormatSize(ulong value) { + return Sigar.FormatSize(value * 1024); + } + public static void Main() { Sigar sigar = new Sigar(); @@ -31,9 +35,9 @@ public class Df { } System.Console.WriteLine(fs.DevName + "\t" + - total + "\t" + - used + "\t" + - avail + "\t" + + FormatSize(total) + "\t" + + FormatSize(used) + "\t" + + FormatSize(avail) + "\t" + usePct + "\t" + fs.DirName + "\t" + fs.SysTypeName + "/" + fs.TypeName);