We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0bd43e4 commit f695e4bCopy full SHA for f695e4b
src/KubernetesClient/Models/IntOrString.cs
@@ -1,9 +1,10 @@
1
+using System.Globalization;
2
+
3
namespace k8s.Models
4
{
5
[JsonConverter(typeof(IntOrStringJsonConverter))]
6
public struct IntOrString
7
- [JsonPropertyName("value")]
8
public string Value { get; private init; }
9
10
public static implicit operator IntOrString(int v)
@@ -30,5 +31,10 @@ public override string ToString()
30
31
32
return Value;
33
}
34
35
+ public int ToInt()
36
+ {
37
+ return int.Parse(Value, CultureInfo.InvariantCulture);
38
+ }
39
40
0 commit comments