Class SharpDialogHelpers
Helper methods for the dialogs.
Inherited Members
Namespace: SharpDialogs
Assembly: SharpDialogs.dll
Syntax
public static class SharpDialogHelpers
Methods
| Edit this page View SourceCompactPath(string, int)
Truncates a path to fit within a certain number of characters by replacing path components with ellipses.
Declaration
public static string CompactPath(string path, int length)
Parameters
| Type | Name | Description |
|---|---|---|
| string | path | The path to be altered. |
| int | length | The maximum number of characters to be contained in the new string. |
Returns
| Type | Description |
|---|---|
| string | Returns the new string. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException |
GetByteSizeString(long)
Converts a numeric value into a string that represents the number expressed as a size value in bytes, kilobytes, megabytes, or gigabytes, depending on the size.
Declaration
public static string GetByteSizeString(long filesize)
Parameters
| Type | Name | Description |
|---|---|---|
| long | filesize | The numeric value to be converted. |
Returns
| Type | Description |
|---|---|
| string | Returns the converted string. |
Exceptions
| Type | Condition |
|---|---|
| ArgumentOutOfRangeException |