Add project files.
This commit is contained in:
32
Helpers/ComboboxItem.cs
Normal file
32
Helpers/ComboboxItem.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace Helpers
|
||||
{
|
||||
public class ComboboxItem
|
||||
{
|
||||
private readonly string _display;
|
||||
private readonly int _hidden;
|
||||
|
||||
public ComboboxItem(string display,int hidden)
|
||||
{
|
||||
_display = display;
|
||||
_hidden = hidden;
|
||||
}
|
||||
public int HiddenValue
|
||||
{
|
||||
get
|
||||
{
|
||||
return _hidden;
|
||||
}
|
||||
}
|
||||
|
||||
public override string ToString()
|
||||
{
|
||||
return _display;
|
||||
}
|
||||
}
|
||||
}
|
||||
7
Helpers/Helpers.csproj
Normal file
7
Helpers/Helpers.csproj
Normal file
@ -0,0 +1,7 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>net5.0</TargetFramework>
|
||||
</PropertyGroup>
|
||||
|
||||
</Project>
|
||||
13
Helpers/StringExtensions.cs
Normal file
13
Helpers/StringExtensions.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
|
||||
namespace Helpers
|
||||
{
|
||||
public static class StringExtensions
|
||||
{
|
||||
public static bool IsNumeric(this string s)
|
||||
{
|
||||
return float.TryParse(s, NumberStyles.Float | NumberStyles.Integer, CultureInfo.CurrentUICulture, out _);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user