Class IntExtensions
Inheritance
object
Namespace: Umbraco.Extensions
Assembly: Umbraco.Core.dll
Syntax
public static class IntExtensions
Methods
View SourceTimes(int, Action<int>)
Does something 'x' amount of times.
Declaration
public static void Times(this int n, Action<int> action)
Parameters
| Type | Name | Description |
|---|---|---|
| int | n | Number of times to execute the action. |
| Action<int> | action | The action to execute. |
ToGuid(int)
Creates a Guid based on an integer value.
Declaration
public static Guid ToGuid(this int value)
Parameters
| Type | Name | Description |
|---|---|---|
| int | value | The int value to convert. |
Returns
| Type | Description |
|---|---|
| Guid | The converted System.Guid. |
TryParseFromGuid(Guid, out int?)
Restores a GUID previously created from an integer value using ToGuid(int).
Declaration
public static bool TryParseFromGuid(Guid value, out int? result)
Parameters
| Type | Name | Description |
|---|---|---|
| Guid | value | The System.Guid value to convert. |
| int? | result | The converted int. |
Returns
| Type | Description |
|---|---|
| bool | True if the int value could be created, otherwise false. |