CodePorting.Translator Cs2Cpp
CodePorting.Translator.Cs2Cpp.Framework
convert.h
1
3#pragma once
4
5#include "system/object.h"
6#include "system/shared_ptr.h"
7#include "fwd.h"
8#include "system/primitive_types.h"
9#include "system/math.h"
10#include "system/exceptions.h"
11#include "system/array.h"
12#include "system/char.h"
13#include "system/decimal.h"
14#include "system/date_time.h"
15#include "system/globalization/number_styles.h"
16#include "system/iformatprovider.h"
17#include "system/type_code.h"
18#include "system/boolean.h"
19#include <type_traits>
20
21namespace System {
22
23class Guid;
24
25namespace Globalization {
26 class CultureInfo;
27 class DateTimeFormatInfo;
28 class NumberFormatInfo;
29}
30
33{
35 None = 0,
38};
39
43struct Convert
44{
47 static ASPOSECPP_SHARED_API SharedPtr<Object> ChangeType(const SharedPtr<Object>& value, const TypeInfo& conversion_type);
48 static ASPOSECPP_SHARED_API SharedPtr<Object> ChangeType(const SharedPtr<Object>& value,
49 const TypeInfo& conversion_type,
50 const SharedPtr<IFormatProvider>& provider);
51
54 template<typename T>
55 static
56 std::enable_if_t<!IsSmartPtr<T>::value, bool>
57 IsDBNull(const T&)
58 {
59 throw NotImplementedException(ASPOSE_CURRENT_FUNCTION);
60 }
61
64 template<typename T>
65 static bool IsDBNull(const SharedPtr<T>& value)
66 {
67 return value == nullptr;
68 }
69
70 // ---------- Base64 Conversions ----------
71
80 static ASPOSECPP_SHARED_API int ToBase64CharArray(const ArrayPtr<uint8_t>& in_array, int offset_in, int length, const ArrayPtr<char16_t>& out_array, int offset_out, bool insert_line_breaks = false);
81
86 static ASPOSECPP_SHARED_API String ToBase64String(const ArrayPtr<uint8_t>& in_array, bool insert_line_breaks = false);
87
94 static ASPOSECPP_SHARED_API String ToBase64String(const ArrayPtr<uint8_t>& in_array, int offset_in, int length, bool insert_line_breaks = false);
95
104 static ASPOSECPP_SHARED_API int ToBase64CharArray(const ArrayPtr<uint8_t>& in_array, int offset_in, int length, const ArrayPtr<char_t>& out_array, int offset_out, Base64FormattingOptions options);
105
110 static ASPOSECPP_SHARED_API String ToBase64String(const ArrayPtr<uint8_t>& in_array, Base64FormattingOptions options);
111
118 static ASPOSECPP_SHARED_API String ToBase64String(const ArrayPtr<uint8_t>& in_array, int offset_in, int length, Base64FormattingOptions options);
119
125 static ASPOSECPP_SHARED_API ArrayPtr<uint8_t> FromBase64CharArray(const ArrayPtr<char_t>& in_array, int offset, int length);
126
130 static ASPOSECPP_SHARED_API ArrayPtr<uint8_t> FromBase64String(const String& s);
131
132 // ---------- Boolean Conversions ----------
133
135 static constexpr bool ToBoolean(bool value) { return value; }
137 static constexpr bool ToBoolean(uint8_t value) { return value != 0; }
139 static constexpr bool ToBoolean(int8_t value) { return value != 0; }
141 static constexpr bool ToBoolean(uint16_t value) { return value != 0; }
143 static constexpr bool ToBoolean(int16_t value) { return value != 0; }
145 static constexpr bool ToBoolean(uint32_t value) { return value != 0; }
147 static constexpr bool ToBoolean(int32_t value) { return value != 0; }
149 static constexpr bool ToBoolean(uint64_t value) { return value != 0; }
151 static constexpr bool ToBoolean(int64_t value) { return value != 0; }
153 static constexpr bool ToBoolean(float value) { return value != 0; }
155 static constexpr bool ToBoolean(double value) { return value != 0; }
157 static bool ToBoolean(const Decimal& value) { return static_cast<bool>(value); }
159 static ASPOSECPP_SHARED_API bool ToBoolean(char_t value);
161 static ASPOSECPP_SHARED_API bool ToBoolean(DateTime value);
162
165 static constexpr bool ToBoolean(std::nullptr_t) { return false; }
166
171 static bool ToBoolean(const char_t* value) { return ToBoolean(String(value)); }
172
177 static ASPOSECPP_SHARED_API bool ToBoolean(const String& value);
178
183 static bool ToBoolean(const String& value, const SharedPtr<IFormatProvider>&) { return ToBoolean(value); }
184
185 // ---------- Byte Conversions ----------
186
188 static constexpr uint8_t ToByte(bool value) { return value ? 1 : 0; }
190 static constexpr uint8_t ToByte(uint8_t value) { return value; }
192 static ASPOSECPP_SHARED_API uint8_t ToByte(int8_t value);
194 static ASPOSECPP_SHARED_API uint8_t ToByte(uint16_t value);
196 static ASPOSECPP_SHARED_API uint8_t ToByte(int16_t value);
198 static ASPOSECPP_SHARED_API uint8_t ToByte(uint32_t value);
200 static ASPOSECPP_SHARED_API uint8_t ToByte(int32_t value);
202 static ASPOSECPP_SHARED_API uint8_t ToByte(uint64_t value);
204 static ASPOSECPP_SHARED_API uint8_t ToByte(int64_t value);
206 static ASPOSECPP_SHARED_API uint8_t ToByte(float value);
208 static ASPOSECPP_SHARED_API uint8_t ToByte(double value);
210 static ASPOSECPP_SHARED_API uint8_t ToByte(const Decimal& value);
212 static ASPOSECPP_SHARED_API uint8_t ToByte(char_t value);
214 static ASPOSECPP_SHARED_API uint8_t ToByte(DateTime value);
215
218 static constexpr uint8_t ToByte(std::nullptr_t) { return 0; }
219
225 static uint8_t ToByte(const char_t* value) { return ToByte(String(value)); }
226
232 static ASPOSECPP_SHARED_API uint8_t ToByte(const String& value);
233
240 static ASPOSECPP_SHARED_API uint8_t ToByte(const String& value, int from_base);
241
248 static ASPOSECPP_SHARED_API uint8_t ToByte(const String& value, const SharedPtr<IFormatProvider>& provider);
249 // Optimized function overloads
250 static ASPOSECPP_SHARED_API uint8_t ToByte(const String& value, const SharedPtr<Globalization::CultureInfo>& culture);
251 static ASPOSECPP_SHARED_API uint8_t ToByte(const String& value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
252 static uint8_t ToByte(const String& value, std::nullptr_t) { return ToByte(value); }
253
261 static ASPOSECPP_SHARED_API uint8_t ToByte(const String& value, Globalization::NumberStyles styles, const SharedPtr<IFormatProvider>& provider);
262 // Optimized function overloads
263 static ASPOSECPP_SHARED_API uint8_t ToByte(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::CultureInfo>& culture);
264 static ASPOSECPP_SHARED_API uint8_t ToByte(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
265 static ASPOSECPP_SHARED_API uint8_t ToByte(const String& value, Globalization::NumberStyles styles, std::nullptr_t = nullptr);
266
267 // ---------- SByte Conversions ----------
268
270 static constexpr int8_t ToSByte(bool value) { return value ? 1 : 0; }
272 static ASPOSECPP_SHARED_API int8_t ToSByte(uint8_t value);
274 static constexpr int8_t ToSByte(int8_t value) { return value; }
276 static ASPOSECPP_SHARED_API int8_t ToSByte(uint16_t value);
278 static ASPOSECPP_SHARED_API int8_t ToSByte(int16_t value);
280 static ASPOSECPP_SHARED_API int8_t ToSByte(uint32_t value);
282 static ASPOSECPP_SHARED_API int8_t ToSByte(int32_t value);
284 static ASPOSECPP_SHARED_API int8_t ToSByte(uint64_t value);
286 static ASPOSECPP_SHARED_API int8_t ToSByte(int64_t value);
288 static ASPOSECPP_SHARED_API int8_t ToSByte(float value);
290 static ASPOSECPP_SHARED_API int8_t ToSByte(double value);
292 static ASPOSECPP_SHARED_API int8_t ToSByte(const Decimal& value);
294 static ASPOSECPP_SHARED_API int8_t ToSByte(char_t value);
296 static ASPOSECPP_SHARED_API int8_t ToSByte(DateTime value);
297
300 static constexpr int8_t ToSByte(std::nullptr_t) { return 0; }
301
307 static int8_t ToSByte(const char_t* value) { return ToSByte(String(value)); }
308
314 static ASPOSECPP_SHARED_API int8_t ToSByte(const String& value);
315
322 static ASPOSECPP_SHARED_API int8_t ToSByte(const String& value, int from_base);
323
330 static ASPOSECPP_SHARED_API int8_t ToSByte(const String& value, const SharedPtr<IFormatProvider>& provider);
331 // Optimized function overloads
332 static ASPOSECPP_SHARED_API int8_t ToSByte(const String& value, const SharedPtr<Globalization::CultureInfo>& culture);
333 static ASPOSECPP_SHARED_API int8_t ToSByte(const String& value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
334 static int8_t ToSByte(const String& value, std::nullptr_t) { return ToSByte(value); }
335
343 static ASPOSECPP_SHARED_API int8_t ToSByte(const String& value, Globalization::NumberStyles styles, const SharedPtr<IFormatProvider>& provider);
344 // Optimized function overloads
345 static ASPOSECPP_SHARED_API int8_t ToSByte(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::CultureInfo>& culture);
346 static ASPOSECPP_SHARED_API int8_t ToSByte(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
347 static ASPOSECPP_SHARED_API int8_t ToSByte(const String& value, Globalization::NumberStyles styles, std::nullptr_t = nullptr);
348
349 // ---------- Char Conversions ----------
350
352 static ASPOSECPP_SHARED_API char_t ToChar(bool value);
354 static constexpr char_t ToChar(uint8_t value) { return value; }
356 static ASPOSECPP_SHARED_API char_t ToChar(int8_t value);
358 static constexpr char_t ToChar(uint16_t value) { return value; }
360 static ASPOSECPP_SHARED_API char_t ToChar(int16_t value);
362 static ASPOSECPP_SHARED_API char_t ToChar(uint32_t value);
364 static ASPOSECPP_SHARED_API char_t ToChar(int32_t value);
366 static ASPOSECPP_SHARED_API char_t ToChar(uint64_t value);
368 static ASPOSECPP_SHARED_API char_t ToChar(int64_t value);
370 static ASPOSECPP_SHARED_API char_t ToChar(float value);
372 static ASPOSECPP_SHARED_API char_t ToChar(double value);
374 static ASPOSECPP_SHARED_API char_t ToChar(const Decimal& value);
376 static constexpr char_t ToChar(char_t value) { return value; }
378 static ASPOSECPP_SHARED_API char_t ToChar(DateTime value);
379
383 static ASPOSECPP_SHARED_API char_t ToChar(const char_t* value);
384
388 static char_t ToChar(const String& value) { return Char::Parse(value); }
389
393 static char_t ToChar(const String& value, const SharedPtr<IFormatProvider>&) { return ToChar(value); }
394
395 // ---------- Int16 Conversions ----------
396
398 static constexpr int16_t ToInt16(bool value) { return value ? 1 : 0; }
400 static constexpr int16_t ToInt16(uint8_t value) { return value; }
402 static constexpr int16_t ToInt16(int8_t value) { return value; }
404 static ASPOSECPP_SHARED_API int16_t ToInt16(uint16_t value);
406 static constexpr int16_t ToInt16(int16_t value) { return value; }
408 static ASPOSECPP_SHARED_API int16_t ToInt16(uint32_t value);
410 static ASPOSECPP_SHARED_API int16_t ToInt16(int32_t value);
412 static ASPOSECPP_SHARED_API int16_t ToInt16(uint64_t value);
414 static ASPOSECPP_SHARED_API int16_t ToInt16(int64_t value);
416 static ASPOSECPP_SHARED_API int16_t ToInt16(float value);
418 static ASPOSECPP_SHARED_API int16_t ToInt16(double value);
420 static ASPOSECPP_SHARED_API int16_t ToInt16(const Decimal& value);
422 static ASPOSECPP_SHARED_API int16_t ToInt16(char_t value);
424 static ASPOSECPP_SHARED_API int16_t ToInt16(DateTime value);
425
428 static constexpr int16_t ToInt16(std::nullptr_t) { return 0; }
429
435 static int16_t ToInt16(const char_t* value) { return ToInt16(String(value)); }
436
442 static ASPOSECPP_SHARED_API int16_t ToInt16(const String& value);
443
450 static ASPOSECPP_SHARED_API int16_t ToInt16(const String& value, int from_base);
451
458 static ASPOSECPP_SHARED_API int16_t ToInt16(const String& value, const SharedPtr<IFormatProvider>& provider);
459 // Optimized function overloads
460 static ASPOSECPP_SHARED_API int16_t ToInt16(const String& value, const SharedPtr<Globalization::CultureInfo>& culture);
461 static ASPOSECPP_SHARED_API int16_t ToInt16(const String& value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
462 static int16_t ToInt16(const String& value, std::nullptr_t) { return ToInt16(value); }
463
471 static ASPOSECPP_SHARED_API int16_t ToInt16(const String& value, Globalization::NumberStyles styles, const SharedPtr<IFormatProvider>& provider);
472 // Optimized function overloads
473 static ASPOSECPP_SHARED_API int16_t ToInt16(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::CultureInfo>& culture);
474 static ASPOSECPP_SHARED_API int16_t ToInt16(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
475 static ASPOSECPP_SHARED_API int16_t ToInt16(const String& value, Globalization::NumberStyles styles, std::nullptr_t = nullptr);
476
477 // ---------- UInt16 Conversions ----------
478
480 static constexpr uint16_t ToUInt16(bool value) { return value ? 1 : 0; }
482 static constexpr uint16_t ToUInt16(uint8_t value) { return value; }
484 static ASPOSECPP_SHARED_API uint16_t ToUInt16(int8_t value);
486 static constexpr uint16_t ToUInt16(uint16_t value) { return value; }
488 static ASPOSECPP_SHARED_API uint16_t ToUInt16(int16_t value);
490 static ASPOSECPP_SHARED_API uint16_t ToUInt16(uint32_t value);
492 static ASPOSECPP_SHARED_API uint16_t ToUInt16(int32_t value);
494 static ASPOSECPP_SHARED_API uint16_t ToUInt16(uint64_t value);
496 static ASPOSECPP_SHARED_API uint16_t ToUInt16(int64_t value);
498 static ASPOSECPP_SHARED_API uint16_t ToUInt16(float value);
500 static ASPOSECPP_SHARED_API uint16_t ToUInt16(double value);
502 static ASPOSECPP_SHARED_API uint16_t ToUInt16(const Decimal& value);
504 static constexpr uint16_t ToUInt16(char_t value) { return value; }
506 static ASPOSECPP_SHARED_API uint16_t ToUInt16(DateTime value);
507
510 static constexpr uint16_t ToUInt16(std::nullptr_t) { return 0; }
511
517 static uint16_t ToUInt16(const char_t* value) { return ToUInt16(String(value)); }
518
524 static ASPOSECPP_SHARED_API uint16_t ToUInt16(const String& value);
525
532 static ASPOSECPP_SHARED_API uint16_t ToUInt16(const String& value, int from_base);
533
540 static ASPOSECPP_SHARED_API uint16_t ToUInt16(const String& value, const SharedPtr<IFormatProvider>& provider);
541 // Optimized function overloads
542 static ASPOSECPP_SHARED_API uint16_t ToUInt16(const String& value, const SharedPtr<Globalization::CultureInfo>& culture);
543 static ASPOSECPP_SHARED_API uint16_t ToUInt16(const String& value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
544 static uint16_t ToUInt16(const String& value, std::nullptr_t) { return ToUInt16(value); }
545
553 static ASPOSECPP_SHARED_API uint16_t ToUInt16(const String& value, Globalization::NumberStyles styles, const SharedPtr<IFormatProvider>& provider);
554 // Optimized function overloads
555 static ASPOSECPP_SHARED_API uint16_t ToUInt16(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::CultureInfo>& culture);
556 static ASPOSECPP_SHARED_API uint16_t ToUInt16(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
557 static ASPOSECPP_SHARED_API uint16_t ToUInt16(const String& value, Globalization::NumberStyles styles, std::nullptr_t = nullptr);
558
559 // ---------- Int32 Conversions ----------
560
562 static constexpr int ToInt32(bool value) { return value ? 1 : 0; }
564 static constexpr int ToInt32(uint8_t value) { return value; }
566 static constexpr int ToInt32(int8_t value) { return value; }
568 static constexpr int ToInt32(uint16_t value) { return value; }
570 static constexpr int ToInt32(int16_t value) { return value; }
572 static ASPOSECPP_SHARED_API int ToInt32(uint32_t value);
574 static constexpr int ToInt32(int32_t value) { return value; }
576 static ASPOSECPP_SHARED_API int ToInt32(uint64_t value);
578 static ASPOSECPP_SHARED_API int ToInt32(int64_t value);
580 static ASPOSECPP_SHARED_API int ToInt32(float value);
582 static ASPOSECPP_SHARED_API int ToInt32(double value);
584 static ASPOSECPP_SHARED_API int ToInt32(const Decimal& value);
586 static constexpr int ToInt32(char_t value) { return value; }
588 static ASPOSECPP_SHARED_API int ToInt32(DateTime value);
589
592 static constexpr int ToInt32(std::nullptr_t) { return 0; }
593
599 static int ToInt32(const char_t* value) { return ToInt32(String(value)); }
600
606 static ASPOSECPP_SHARED_API int ToInt32(const String& value);
607
614 static ASPOSECPP_SHARED_API int ToInt32(const String& value, int from_base);
615
622 static ASPOSECPP_SHARED_API int ToInt32(const String& value, const SharedPtr<IFormatProvider>& provider);
623 // Optimized function overloads
624 static ASPOSECPP_SHARED_API int ToInt32(const String& value, const SharedPtr<Globalization::CultureInfo>& culture);
625 static ASPOSECPP_SHARED_API int ToInt32(const String& value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
626 static int ToInt32(const String& value, std::nullptr_t) { return ToInt32(value); }
627
635 static ASPOSECPP_SHARED_API int ToInt32(const String& value, Globalization::NumberStyles styles, const SharedPtr<IFormatProvider>& provider);
636 // Optimized function overloads
637 static ASPOSECPP_SHARED_API int ToInt32(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::CultureInfo>& culture);
638 static ASPOSECPP_SHARED_API int ToInt32(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
639 static ASPOSECPP_SHARED_API int ToInt32(const String& value, Globalization::NumberStyles styles, std::nullptr_t = nullptr);
640
641 // ---------- UInt32 Conversions ----------
642
644 static constexpr uint32_t ToUInt32(bool value) { return value ? 1 : 0; }
646 static constexpr uint32_t ToUInt32(uint8_t value) { return value; }
648 static ASPOSECPP_SHARED_API uint32_t ToUInt32(int8_t value);
650 static constexpr uint32_t ToUInt32(uint16_t value) { return value; }
652 static ASPOSECPP_SHARED_API uint32_t ToUInt32(int16_t value);
654 static constexpr uint32_t ToUInt32(uint32_t value) { return value; }
656 static ASPOSECPP_SHARED_API uint32_t ToUInt32(int32_t value);
658 static ASPOSECPP_SHARED_API uint32_t ToUInt32(uint64_t value);
660 static ASPOSECPP_SHARED_API uint32_t ToUInt32(int64_t value);
662 static ASPOSECPP_SHARED_API uint32_t ToUInt32(float value);
664 static ASPOSECPP_SHARED_API uint32_t ToUInt32(double value);
666 static ASPOSECPP_SHARED_API uint32_t ToUInt32(const Decimal& value);
668 static constexpr uint32_t ToUInt32(char_t value) { return value; }
670 static ASPOSECPP_SHARED_API uint32_t ToUInt32(DateTime value);
671
674 static constexpr uint32_t ToUInt32(std::nullptr_t) { return 0; }
675
681 static uint32_t ToUInt32(const char_t* value) { return ToUInt32(String(value)); }
682
688 static ASPOSECPP_SHARED_API uint32_t ToUInt32(const String& value);
689
696 static ASPOSECPP_SHARED_API uint32_t ToUInt32(const String& value, int from_base);
697
704 static ASPOSECPP_SHARED_API uint32_t ToUInt32(const String& value, const SharedPtr<IFormatProvider>& provider);
705 // Optimized function overloads
706 static ASPOSECPP_SHARED_API uint32_t ToUInt32(const String& value, const SharedPtr<Globalization::CultureInfo>& culture);
707 static ASPOSECPP_SHARED_API uint32_t ToUInt32(const String& value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
708 static uint32_t ToUInt32(const String& value, std::nullptr_t) { return ToUInt32(value); }
709
717 static ASPOSECPP_SHARED_API uint32_t ToUInt32(const String& value, Globalization::NumberStyles styles, const SharedPtr<IFormatProvider>& provider);
718 // Optimized function overloads
719 static ASPOSECPP_SHARED_API uint32_t ToUInt32(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::CultureInfo>& culture);
720 static ASPOSECPP_SHARED_API uint32_t ToUInt32(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
721 static ASPOSECPP_SHARED_API uint32_t ToUInt32(const String& value, Globalization::NumberStyles styles, std::nullptr_t = nullptr);
722
723 // ---------- Int64 Conversions ----------
724
726 static constexpr int64_t ToInt64(bool value) { return value ? 1 : 0; }
728 static constexpr int64_t ToInt64(uint8_t value) { return value; }
730 static constexpr int64_t ToInt64(int8_t value) { return value; }
732 static constexpr int64_t ToInt64(uint16_t value) { return value; }
734 static constexpr int64_t ToInt64(int16_t value) { return value; }
736 static constexpr int64_t ToInt64(uint32_t value) { return value; }
738 static constexpr int64_t ToInt64(int32_t value) { return value; }
740 static ASPOSECPP_SHARED_API int64_t ToInt64(uint64_t value);
742 static constexpr int64_t ToInt64(int64_t value) { return value; }
744 static ASPOSECPP_SHARED_API int64_t ToInt64(float value);
746 static ASPOSECPP_SHARED_API int64_t ToInt64(double value);
748 static ASPOSECPP_SHARED_API int64_t ToInt64(const Decimal& value);
750 static constexpr int64_t ToInt64(char_t value) { return value; }
752 static ASPOSECPP_SHARED_API int64_t ToInt64(DateTime value);
753
756 static constexpr int64_t ToInt64(std::nullptr_t) { return 0; }
757
763 static int64_t ToInt64(const char_t* value) { return ToInt64(String(value)); }
764
770 static ASPOSECPP_SHARED_API int64_t ToInt64(const String& value);
771
778 static ASPOSECPP_SHARED_API int64_t ToInt64(const String& value, int from_base);
779
786 static ASPOSECPP_SHARED_API int64_t ToInt64(const String& value, const SharedPtr<IFormatProvider>& provider);
787 // Optimized function overloads
788 static ASPOSECPP_SHARED_API int64_t ToInt64(const String& value, const SharedPtr<Globalization::CultureInfo>& culture);
789 static ASPOSECPP_SHARED_API int64_t ToInt64(const String& value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
790 static int64_t ToInt64(const String& value, std::nullptr_t) { return ToInt64(value); }
791
799 static ASPOSECPP_SHARED_API int64_t ToInt64(const String& value, Globalization::NumberStyles styles, const SharedPtr<IFormatProvider>& provider);
800 // Optimized function overloads
801 static ASPOSECPP_SHARED_API int64_t ToInt64(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::CultureInfo>& culture);
802 static ASPOSECPP_SHARED_API int64_t ToInt64(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
803 static ASPOSECPP_SHARED_API int64_t ToInt64(const String& value, Globalization::NumberStyles styles, std::nullptr_t = nullptr);
804
805 // ---------- UInt64 Conversions ----------
806
808 static constexpr uint64_t ToUInt64(bool value) { return value ? 1 : 0; }
810 static constexpr uint64_t ToUInt64(uint8_t value) { return value; }
812 static ASPOSECPP_SHARED_API uint64_t ToUInt64(int8_t value);
814 static constexpr uint64_t ToUInt64(uint16_t value) { return value; }
816 static ASPOSECPP_SHARED_API uint64_t ToUInt64(int16_t value);
818 static constexpr uint64_t ToUInt64(uint32_t value) { return value; }
820 static ASPOSECPP_SHARED_API uint64_t ToUInt64(int32_t value);
822 static constexpr uint64_t ToUInt64(uint64_t value) { return value; }
824 static ASPOSECPP_SHARED_API uint64_t ToUInt64(int64_t value);
826 static ASPOSECPP_SHARED_API uint64_t ToUInt64(float value);
828 static ASPOSECPP_SHARED_API uint64_t ToUInt64(double value);
830 static ASPOSECPP_SHARED_API uint64_t ToUInt64(const Decimal& value);
832 static constexpr uint64_t ToUInt64(char_t value) { return value; }
834 static ASPOSECPP_SHARED_API uint64_t ToUInt64(DateTime value);
835
838 static constexpr uint64_t ToUInt64(std::nullptr_t) { return 0; }
839
845 static uint64_t ToUInt64(const char_t* value) { return ToUInt64(String(value)); }
846
852 static ASPOSECPP_SHARED_API uint64_t ToUInt64(const String& value);
853
860 static ASPOSECPP_SHARED_API uint64_t ToUInt64(const String& value, int from_base);
861
868 static ASPOSECPP_SHARED_API uint64_t ToUInt64(const String& value, const SharedPtr<IFormatProvider>& provider);
869 // Optimized function overloads
870 static ASPOSECPP_SHARED_API uint64_t ToUInt64(const String& value, const SharedPtr<Globalization::CultureInfo>& culture);
871 static ASPOSECPP_SHARED_API uint64_t ToUInt64(const String& value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
872 static uint64_t ToUInt64(const String& value, std::nullptr_t) { return ToUInt64(value); }
873
881 static ASPOSECPP_SHARED_API uint64_t ToUInt64(const String& value, Globalization::NumberStyles styles, const SharedPtr<IFormatProvider>& provider);
882 // Optimized function overloads
883 static ASPOSECPP_SHARED_API uint64_t ToUInt64(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::CultureInfo>& culture);
884 static ASPOSECPP_SHARED_API uint64_t ToUInt64(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
885 static ASPOSECPP_SHARED_API uint64_t ToUInt64(const String& value, Globalization::NumberStyles styles, std::nullptr_t = nullptr);
886
887 // ---------- Single Conversions ----------
888
890 static constexpr float ToSingle(bool value) { return value ? 1.f : 0.f; }
892 static constexpr float ToSingle(uint8_t value) { return static_cast<float>(value); }
894 static constexpr float ToSingle(int8_t value) { return static_cast<float>(value); }
896 static constexpr float ToSingle(uint16_t value) { return static_cast<float>(value); }
898 static constexpr float ToSingle(int16_t value) { return static_cast<float>(value); }
900 static constexpr float ToSingle(uint32_t value) { return static_cast<float>(value); }
902 static constexpr float ToSingle(int32_t value) { return static_cast<float>(value); }
904 static constexpr float ToSingle(uint64_t value) { return static_cast<float>(value); }
906 static constexpr float ToSingle(int64_t value) { return static_cast<float>(value); }
908 static constexpr float ToSingle(float value) { return value; }
910 static constexpr float ToSingle(double value) { return static_cast<float>(value); }
912 static float ToSingle(const Decimal& value) { return static_cast<float>(value); }
914 static ASPOSECPP_SHARED_API float ToSingle(char_t value);
916 static ASPOSECPP_SHARED_API float ToSingle(DateTime value);
917
920 static constexpr float ToSingle(std::nullptr_t) { return 0; }
921
925 static float ToSingle(const char_t* value) { return ToSingle(String(value)); }
926
930 static ASPOSECPP_SHARED_API float ToSingle(const String& value);
931
936 static ASPOSECPP_SHARED_API float ToSingle(const String& value, const SharedPtr<IFormatProvider>& provider);
937 // Optimized function overloads
938 static ASPOSECPP_SHARED_API float ToSingle(const String& value, const SharedPtr<Globalization::CultureInfo>& culture);
939 static ASPOSECPP_SHARED_API float ToSingle(const String& value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
940 static float ToSingle(const String& value, std::nullptr_t) { return ToSingle(value); }
941
947 static ASPOSECPP_SHARED_API float ToSingle(const String& value, Globalization::NumberStyles styles, const SharedPtr<IFormatProvider>& provider);
948 // Optimized function overloads
949 static ASPOSECPP_SHARED_API float ToSingle(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::CultureInfo>& culture);
950 static ASPOSECPP_SHARED_API float ToSingle(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
951 static ASPOSECPP_SHARED_API float ToSingle(const String& value, Globalization::NumberStyles styles, std::nullptr_t = nullptr);
952
953 // ---------- Double Conversions ----------
954
956 static constexpr double ToDouble(bool value) { return value ? 1 : 0; }
958 static constexpr double ToDouble(uint8_t value) { return static_cast<double>(value); }
960 static constexpr double ToDouble(int8_t value) { return static_cast<double>(value); }
962 static constexpr double ToDouble(uint16_t value) { return static_cast<double>(value); }
964 static constexpr double ToDouble(int16_t value) { return static_cast<double>(value); }
966 static constexpr double ToDouble(uint32_t value) { return static_cast<double>(value); }
968 static constexpr double ToDouble(int32_t value) { return static_cast<double>(value); }
970 static constexpr double ToDouble(uint64_t value) { return static_cast<double>(value); }
972 static constexpr double ToDouble(int64_t value) { return static_cast<double>(value); }
974 static constexpr double ToDouble(float value) { return value; }
976 static constexpr double ToDouble(double value) { return value; }
978 static double ToDouble(const Decimal& value) { return static_cast<double>(value); }
980 static ASPOSECPP_SHARED_API double ToDouble(char_t value);
982 static ASPOSECPP_SHARED_API double ToDouble(DateTime value);
983
986 static constexpr double ToDouble(std::nullptr_t) { return 0; }
987
991 static double ToDouble(const char_t* value) { return ToDouble(String(value)); }
992
996 static ASPOSECPP_SHARED_API double ToDouble(const String& value);
997
1002 static ASPOSECPP_SHARED_API double ToDouble(const String& value, const SharedPtr<IFormatProvider>& provider);
1003 // Optimized function overloads
1004 static ASPOSECPP_SHARED_API double ToDouble(const String& value, const SharedPtr<Globalization::CultureInfo>& culture);
1005 static ASPOSECPP_SHARED_API double ToDouble(const String& value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1006 static double ToDouble(const String& value, std::nullptr_t) { return ToDouble(value); }
1007
1013 static ASPOSECPP_SHARED_API double ToDouble(const String& value, Globalization::NumberStyles styles, const SharedPtr<IFormatProvider>& provider);
1014 // Optimized function overloads
1015 static ASPOSECPP_SHARED_API double ToDouble(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::CultureInfo>& culture);
1016 static ASPOSECPP_SHARED_API double ToDouble(const String& value, Globalization::NumberStyles styles, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1017 static ASPOSECPP_SHARED_API double ToDouble(const String& value, Globalization::NumberStyles styles, std::nullptr_t = nullptr);
1018
1019 // ---------- Decimal Conversions ----------
1020
1022 static Decimal ToDecimal(bool value) { return value ? 1 : 0; }
1024 static Decimal ToDecimal(uint8_t value) { return Decimal(value); }
1026 static Decimal ToDecimal(int8_t value) { return Decimal(value); }
1028 static Decimal ToDecimal(uint16_t value) { return Decimal(value); }
1030 static Decimal ToDecimal(int16_t value) { return Decimal(value); }
1032 static Decimal ToDecimal(uint32_t value) { return Decimal(value); }
1034 static Decimal ToDecimal(int32_t value) { return Decimal(value); }
1036 static Decimal ToDecimal(uint64_t value) { return Decimal(value); }
1038 static Decimal ToDecimal(int64_t value) { return Decimal(value); }
1040 static Decimal ToDecimal(float value) { return Decimal(value); }
1042 static Decimal ToDecimal(double value) { return Decimal(value); }
1044 static Decimal ToDecimal(const Decimal& value) { return value; }
1046 static ASPOSECPP_SHARED_API Decimal ToDecimal(char_t value);
1048 static ASPOSECPP_SHARED_API Decimal ToDecimal(DateTime value);
1049
1052 static Decimal ToDecimal(std::nullptr_t) { return Decimal::Zero; }
1053
1057 static Decimal ToDecimal(const char_t* value) { return ToDecimal(String(value)); }
1058
1062 static ASPOSECPP_SHARED_API Decimal ToDecimal(const String& value);
1063
1068 static ASPOSECPP_SHARED_API Decimal ToDecimal(const String& value, const SharedPtr<IFormatProvider>& provider);
1069
1075 static ASPOSECPP_SHARED_API Decimal ToDecimal(const String& value, Globalization::NumberStyles styles, const SharedPtr<IFormatProvider>& provider);
1076
1077 // ---------- DateTime Conversions ----------
1078
1080 static ASPOSECPP_SHARED_API DateTime ToDateTime(bool value);
1082 static ASPOSECPP_SHARED_API DateTime ToDateTime(uint8_t value);
1084 static ASPOSECPP_SHARED_API DateTime ToDateTime(int8_t value);
1086 static ASPOSECPP_SHARED_API DateTime ToDateTime(uint16_t value);
1088 static ASPOSECPP_SHARED_API DateTime ToDateTime(int16_t value);
1090 static ASPOSECPP_SHARED_API DateTime ToDateTime(uint32_t value);
1092 static ASPOSECPP_SHARED_API DateTime ToDateTime(int32_t value);
1094 static ASPOSECPP_SHARED_API DateTime ToDateTime(uint64_t value);
1096 static ASPOSECPP_SHARED_API DateTime ToDateTime(int64_t value);
1098 static ASPOSECPP_SHARED_API DateTime ToDateTime(float value);
1100 static ASPOSECPP_SHARED_API DateTime ToDateTime(double value);
1102 static ASPOSECPP_SHARED_API DateTime ToDateTime(const Decimal& value);
1104 static ASPOSECPP_SHARED_API DateTime ToDateTime(char_t value);
1106 static constexpr DateTime ToDateTime(DateTime value) { return value; }
1107
1111 static ASPOSECPP_SHARED_API DateTime ToDateTime(const String& value);
1112
1117 static ASPOSECPP_SHARED_API DateTime ToDateTime(const String& value, const SharedPtr<IFormatProvider>& fp);
1118 // Optimized function overloads
1119 static ASPOSECPP_SHARED_API DateTime ToDateTime(const String& value, const SharedPtr<Globalization::CultureInfo>& culture);
1120 static ASPOSECPP_SHARED_API DateTime ToDateTime(const String& value, const SharedPtr<Globalization::DateTimeFormatInfo>& dtfi);
1121 static DateTime ToDateTime(const String& value, std::nullptr_t) { return ToDateTime(value); }
1122
1123 // ---------- String Conversions ----------
1124
1128 static ASPOSECPP_SHARED_API String ToString(int8_t value);
1132 static ASPOSECPP_SHARED_API String ToString(uint8_t value);
1136 static ASPOSECPP_SHARED_API String ToString(int16_t value);
1140 static ASPOSECPP_SHARED_API String ToString(uint16_t value);
1144 static ASPOSECPP_SHARED_API String ToString(int32_t value);
1148 static ASPOSECPP_SHARED_API String ToString(uint32_t value);
1152 static ASPOSECPP_SHARED_API String ToString(int64_t value);
1156 static ASPOSECPP_SHARED_API String ToString(uint64_t value);
1160 static ASPOSECPP_SHARED_API String ToString(float value);
1164 static ASPOSECPP_SHARED_API String ToString(double value);
1168 static ASPOSECPP_SHARED_API String ToString(const Decimal& value);
1172 static ASPOSECPP_SHARED_API String ToString(DateTime value);
1173
1178 static ASPOSECPP_SHARED_API String ToString(int8_t value, const SharedPtr<IFormatProvider>& provider);
1179 // Optimized function overloads
1180 static ASPOSECPP_SHARED_API String ToString(int8_t value, const SharedPtr<Globalization::CultureInfo>& culture);
1181 static ASPOSECPP_SHARED_API String ToString(int8_t value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1182 static String ToString(int8_t value, std::nullptr_t) { return ToString(value); }
1183
1188 static ASPOSECPP_SHARED_API String ToString(uint8_t value, const SharedPtr<IFormatProvider>& provider);
1189 // Optimized function overloads
1190 static ASPOSECPP_SHARED_API String ToString(uint8_t value, const SharedPtr<Globalization::CultureInfo>& culture);
1191 static ASPOSECPP_SHARED_API String ToString(uint8_t value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1192 static String ToString(uint8_t value, std::nullptr_t) { return ToString(value); }
1193
1198 static ASPOSECPP_SHARED_API String ToString(int16_t value, const SharedPtr<IFormatProvider>& provider);
1199 // Optimized function overloads
1200 static ASPOSECPP_SHARED_API String ToString(int16_t value, const SharedPtr<Globalization::CultureInfo>& culture);
1201 static ASPOSECPP_SHARED_API String ToString(int16_t value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1202 static String ToString(int16_t value, std::nullptr_t) { return ToString(value); }
1203
1208 static ASPOSECPP_SHARED_API String ToString(uint16_t value, const SharedPtr<IFormatProvider>& provider);
1209 // Optimized function overloads
1210 static ASPOSECPP_SHARED_API String ToString(uint16_t value, const SharedPtr<Globalization::CultureInfo>& culture);
1211 static ASPOSECPP_SHARED_API String ToString(uint16_t value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1212 static String ToString(uint16_t value, std::nullptr_t) { return ToString(value); }
1213
1218 static ASPOSECPP_SHARED_API String ToString(int32_t value, const SharedPtr<IFormatProvider>& provider);
1219 // Optimized function overloads
1220 static ASPOSECPP_SHARED_API String ToString(int32_t value, const SharedPtr<Globalization::CultureInfo>& culture);
1221 static ASPOSECPP_SHARED_API String ToString(int32_t value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1222 static String ToString(int32_t value, std::nullptr_t) { return ToString(value); }
1223
1228 static ASPOSECPP_SHARED_API String ToString(uint32_t value, const SharedPtr<IFormatProvider>& provider);
1229 // Optimized function overloads
1230 static ASPOSECPP_SHARED_API String ToString(uint32_t value, const SharedPtr<Globalization::CultureInfo>& culture);
1231 static ASPOSECPP_SHARED_API String ToString(uint32_t value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1232 static String ToString(uint32_t value, std::nullptr_t) { return ToString(value); }
1233
1238 static ASPOSECPP_SHARED_API String ToString(int64_t value, const SharedPtr<IFormatProvider>& provider);
1239 // Optimized function overloads
1240 static ASPOSECPP_SHARED_API String ToString(int64_t value, const SharedPtr<Globalization::CultureInfo>& culture);
1241 static ASPOSECPP_SHARED_API String ToString(int64_t value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1242 static String ToString(int64_t value, std::nullptr_t) { return ToString(value); }
1243
1248 static ASPOSECPP_SHARED_API String ToString(uint64_t value, const SharedPtr<IFormatProvider>& provider);
1249 // Optimized function overloads
1250 static ASPOSECPP_SHARED_API String ToString(uint64_t value, const SharedPtr<Globalization::CultureInfo>& culture);
1251 static ASPOSECPP_SHARED_API String ToString(uint64_t value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1252 static String ToString(uint64_t value, std::nullptr_t) { return ToString(value); }
1253
1258 static ASPOSECPP_SHARED_API String ToString(float value, const SharedPtr<IFormatProvider>& provider);
1259 // Optimized function overloads
1260 static ASPOSECPP_SHARED_API String ToString(float value, const SharedPtr<Globalization::CultureInfo>& culture);
1261 static ASPOSECPP_SHARED_API String ToString(float value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1262 static String ToString(float value, std::nullptr_t) { return ToString(value); }
1263
1268 static ASPOSECPP_SHARED_API String ToString(double value, const SharedPtr<IFormatProvider>& provider);
1269 // Optimized function overloads
1270 static ASPOSECPP_SHARED_API String ToString(double value, const SharedPtr<Globalization::CultureInfo>& culture);
1271 static ASPOSECPP_SHARED_API String ToString(double value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1272 static String ToString(double value, std::nullptr_t) { return ToString(value); }
1273
1278 static ASPOSECPP_SHARED_API String ToString(const Decimal& value, const SharedPtr<IFormatProvider>& provider);
1279 // Optimized function overloads
1280 static ASPOSECPP_SHARED_API String ToString(const Decimal& value, const SharedPtr<Globalization::CultureInfo>& culture);
1281 static ASPOSECPP_SHARED_API String ToString(const Decimal& value, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1282 static String ToString(const Decimal& value, std::nullptr_t) { return ToString(value); }
1283
1288 static ASPOSECPP_SHARED_API String ToString(DateTime value, const SharedPtr<IFormatProvider>& provider);
1289 // Optimized function overloads
1290 static ASPOSECPP_SHARED_API String ToString(DateTime value, const SharedPtr<Globalization::CultureInfo>& culture);
1291 static ASPOSECPP_SHARED_API String ToString(DateTime value, const SharedPtr<Globalization::DateTimeFormatInfo>& dtfi);
1292 static String ToString(DateTime value, std::nullptr_t) { return ToString(value); }
1293
1300 static ASPOSECPP_SHARED_API String ToString(int8_t value, const String& format, const SharedPtr<IFormatProvider>& provider);
1301 // Optimized function overloads
1302 static ASPOSECPP_SHARED_API String ToString(int8_t value, const String& format, const SharedPtr<Globalization::CultureInfo>& culture);
1303 static ASPOSECPP_SHARED_API String ToString(int8_t value, const String& format, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1304 static ASPOSECPP_SHARED_API String ToString(int8_t value, const String& format, std::nullptr_t = nullptr);
1305
1312 static ASPOSECPP_SHARED_API String ToString(uint8_t value, const String& format, const SharedPtr<IFormatProvider>& provider);
1313 // Optimized function overloads
1314 static ASPOSECPP_SHARED_API String ToString(uint8_t value, const String& format, const SharedPtr<Globalization::CultureInfo>& culture);
1315 static ASPOSECPP_SHARED_API String ToString(uint8_t value, const String& format, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1316 static ASPOSECPP_SHARED_API String ToString(uint8_t value, const String& format, std::nullptr_t = nullptr);
1317
1324 static ASPOSECPP_SHARED_API String ToString(int16_t value, const String& format, const SharedPtr<IFormatProvider>& provider);
1325 // Optimized function overloads
1326 static ASPOSECPP_SHARED_API String ToString(int16_t value, const String& format, const SharedPtr<Globalization::CultureInfo>& culture);
1327 static ASPOSECPP_SHARED_API String ToString(int16_t value, const String& format, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1328 static ASPOSECPP_SHARED_API String ToString(int16_t value, const String& format, std::nullptr_t = nullptr);
1329
1336 static ASPOSECPP_SHARED_API String ToString(uint16_t value, const String& format, const SharedPtr<IFormatProvider>& provider);
1337 // Optimized function overloads
1338 static ASPOSECPP_SHARED_API String ToString(uint16_t value, const String& format, const SharedPtr<Globalization::CultureInfo>& culture);
1339 static ASPOSECPP_SHARED_API String ToString(uint16_t value, const String& format, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1340 static ASPOSECPP_SHARED_API String ToString(uint16_t value, const String& format, std::nullptr_t = nullptr);
1341
1348 static ASPOSECPP_SHARED_API String ToString(int32_t value, const String& format, const SharedPtr<IFormatProvider>& provider);
1349 // Optimized function overloads
1350 static ASPOSECPP_SHARED_API String ToString(int32_t value, const String& format, const SharedPtr<Globalization::CultureInfo>& culture);
1351 static ASPOSECPP_SHARED_API String ToString(int32_t value, const String& format, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1352 static ASPOSECPP_SHARED_API String ToString(int32_t value, const String& format, std::nullptr_t = nullptr);
1353
1360 static ASPOSECPP_SHARED_API String ToString(uint32_t value, const String& format, const SharedPtr<IFormatProvider>& provider);
1361 // Optimized function overloads
1362 static ASPOSECPP_SHARED_API String ToString(uint32_t value, const String& format, const SharedPtr<Globalization::CultureInfo>& culture);
1363 static ASPOSECPP_SHARED_API String ToString(uint32_t value, const String& format, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1364 static ASPOSECPP_SHARED_API String ToString(uint32_t value, const String& format, std::nullptr_t = nullptr);
1365
1372 static ASPOSECPP_SHARED_API String ToString(int64_t value, const String& format, const SharedPtr<IFormatProvider>& provider);
1373 // Optimized function overloads
1374 static ASPOSECPP_SHARED_API String ToString(int64_t value, const String& format, const SharedPtr<Globalization::CultureInfo>& culture);
1375 static ASPOSECPP_SHARED_API String ToString(int64_t value, const String& format, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1376 static ASPOSECPP_SHARED_API String ToString(int64_t value, const String& format, std::nullptr_t = nullptr);
1377
1384 static ASPOSECPP_SHARED_API String ToString(uint64_t value, const String& format, const SharedPtr<IFormatProvider>& provider);
1385 // Optimized function overloads
1386 static ASPOSECPP_SHARED_API String ToString(uint64_t value, const String& format, const SharedPtr<Globalization::CultureInfo>& culture);
1387 static ASPOSECPP_SHARED_API String ToString(uint64_t value, const String& format, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1388 static ASPOSECPP_SHARED_API String ToString(uint64_t value, const String& format, std::nullptr_t = nullptr);
1389
1396 static ASPOSECPP_SHARED_API String ToString(float value, const String& format, const SharedPtr<IFormatProvider>& provider);
1397 // Optimized function overloads
1398 static ASPOSECPP_SHARED_API String ToString(float value, const String& format, const SharedPtr<Globalization::CultureInfo>& culture);
1399 static ASPOSECPP_SHARED_API String ToString(float value, const String& format, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1400 static ASPOSECPP_SHARED_API String ToString(float value, const String& format, std::nullptr_t = nullptr);
1401
1408 static ASPOSECPP_SHARED_API String ToString(double value, const String& format, const SharedPtr<IFormatProvider>& provider);
1409 // Optimized function overloads
1410 static ASPOSECPP_SHARED_API String ToString(double value, const String& format, const SharedPtr<Globalization::CultureInfo>& culture);
1411 static ASPOSECPP_SHARED_API String ToString(double value, const String& format, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1412 static ASPOSECPP_SHARED_API String ToString(double value, const String& format, std::nullptr_t = nullptr);
1413
1420 static ASPOSECPP_SHARED_API String ToString(const Decimal& value, const String& format, const SharedPtr<IFormatProvider>& provider);
1421 // Optimized function overloads
1422 static ASPOSECPP_SHARED_API String ToString(const Decimal& value, const String& format, const SharedPtr<Globalization::CultureInfo>& culture);
1423 static ASPOSECPP_SHARED_API String ToString(const Decimal& value, const String& format, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1424 static ASPOSECPP_SHARED_API String ToString(const Decimal& value, const String& format, std::nullptr_t = nullptr);
1425
1432 static ASPOSECPP_SHARED_API String ToString(DateTime value, const String& format, const SharedPtr<IFormatProvider>& provider);
1433 // Optimized function overloads
1434 static ASPOSECPP_SHARED_API String ToString(DateTime value, const String& format, const SharedPtr<Globalization::CultureInfo>& culture);
1435 static ASPOSECPP_SHARED_API String ToString(DateTime value, const String& format, const SharedPtr<Globalization::NumberFormatInfo>& nfi);
1436 static ASPOSECPP_SHARED_API String ToString(DateTime value, const String& format, std::nullptr_t = nullptr);
1437
1441 static ASPOSECPP_SHARED_API String ToString(const Guid& value);
1442
1447 static ASPOSECPP_SHARED_API String ToString(const Guid& value, const String& format);
1448
1453 template <size_t N>
1454 static String ToString(const char_t(&value)[N], std::nullptr_t = nullptr)
1455 {
1456 return String(value, N - 1);
1457 }
1462 template <size_t N>
1463 static String ToString(const char_t(&value)[N], const SharedPtr<IFormatProvider>&)
1464 {
1465 return String(value, N - 1);
1466 }
1467 template <size_t N>
1468 static String ToString(const char_t(&value)[N], const SharedPtr<Globalization::CultureInfo>&)
1469 {
1470 return String(value, N - 1);
1471 }
1472
1474 static String ToString(const String& value, std::nullptr_t = nullptr)
1475 {
1476 return value;
1477 }
1480 {
1481 return value;
1482 }
1485 {
1486 return value;
1487 }
1490 {
1491 return value;
1492 }
1493
1495 static String ToString(char_t value, std::nullptr_t = nullptr)
1496 {
1497 return String(value, 1);
1498 }
1500 static String ToString(char_t value, const SharedPtr<IFormatProvider>&)
1501 {
1502 return String(value, 1);
1503 }
1506 {
1507 return String(value, 1);
1508 }
1510 static String ToString(char_t value, const String& /*format*/, const SharedPtr<IFormatProvider>&)
1511 {
1512 return String(value, 1);
1513 }
1515 static String ToString(char_t value, const String& /*format*/, const SharedPtr<Globalization::CultureInfo>&)
1516 {
1517 return String(value, 1);
1518 }
1520 static String ToString(char_t value, const String& /*format*/, std::nullptr_t)
1521 {
1522 return String(value, 1);
1523 }
1524
1528 static String ToString(bool value, std::nullptr_t = nullptr)
1529 {
1531 }
1535 static String ToString(bool value, const SharedPtr<IFormatProvider>&)
1536 {
1537 return ToString(value);
1538 }
1543 {
1544 return ToString(value);
1545 }
1550 {
1551 return ToString(value);
1552 }
1556 static String ToString(bool value, const String&, const SharedPtr<IFormatProvider>&)
1557 {
1558 return ToString(value);
1559 }
1564 {
1565 return ToString(value);
1566 }
1570 static String ToString(bool value, const String&, std::nullptr_t)
1571 {
1572 return ToString(value);
1573 }
1574
1579 static ASPOSECPP_SHARED_API String ToString(int8_t value, int to_base);
1580
1585 static ASPOSECPP_SHARED_API String ToString(int16_t value, int to_base);
1586
1591 static ASPOSECPP_SHARED_API String ToString(int32_t value, int to_base);
1592
1597 static ASPOSECPP_SHARED_API String ToString(int64_t value, int to_base);
1598
1599 // Helper functions for C#-like integral promotions
1600 static String ToString(uint8_t value, int to_base) { return ToString(static_cast<int16_t>(value), to_base); }
1601 static String ToString(uint16_t value, int to_base) { return ToString(static_cast<int32_t>(value), to_base); }
1602 static String ToString(uint32_t value, int to_base) { return ToString(static_cast<int64_t>(value), to_base); }
1603
1604 // ---------- Enum Conversions ----------
1605
1606 template <typename Enum, typename = typename std::enable_if<std::is_enum<Enum>::value>::type>
1607 static uint8_t ToByte(Enum value)
1608 {
1609 return ToByte(static_cast<typename std::underlying_type<Enum>::type>(value));
1610 }
1611
1612 template <typename Enum, typename = typename std::enable_if<std::is_enum<Enum>::value>::type>
1613 static int8_t ToSByte(Enum value)
1614 {
1615 return ToSByte(static_cast<typename std::underlying_type<Enum>::type>(value));
1616 }
1617
1618 template <typename Enum, typename = typename std::enable_if<std::is_enum<Enum>::value>::type>
1619 static uint16_t ToUInt16(Enum value)
1620 {
1621 return ToUInt16(static_cast<typename std::underlying_type<Enum>::type>(value));
1622 }
1623
1624 template <typename Enum, typename = typename std::enable_if<std::is_enum<Enum>::value>::type>
1625 static int16_t ToInt16(Enum value)
1626 {
1627 return ToInt16(static_cast<typename std::underlying_type<Enum>::type>(value));
1628 }
1629
1630 template <typename Enum, typename = typename std::enable_if<std::is_enum<Enum>::value>::type>
1631 static uint32_t ToUInt32(Enum value)
1632 {
1633 return ToUInt32(static_cast<typename std::underlying_type<Enum>::type>(value));
1634 }
1635
1636 template <typename Enum, typename = typename std::enable_if<std::is_enum<Enum>::value>::type>
1637 static int32_t ToInt32(Enum value)
1638 {
1639 return ToInt32(static_cast<typename std::underlying_type<Enum>::type>(value));
1640 }
1641
1642 template <typename Enum, typename = typename std::enable_if<std::is_enum<Enum>::value>::type>
1643 static uint64_t ToUInt64(Enum value)
1644 {
1645 return ToUInt64(static_cast<typename std::underlying_type<Enum>::type>(value));
1646 }
1647
1648 template <typename Enum, typename = typename std::enable_if<std::is_enum<Enum>::value>::type>
1649 static int64_t ToInt64(Enum value)
1650 {
1651 return ToInt64(static_cast<typename std::underlying_type<Enum>::type>(value));
1652 }
1653
1654 // ---------- Boxed Conversions ----------
1655
1660 static ASPOSECPP_SHARED_API bool ToBoolean(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1661
1666 static ASPOSECPP_SHARED_API uint8_t ToByte(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1667
1672 static ASPOSECPP_SHARED_API int8_t ToSByte(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1673
1678 static ASPOSECPP_SHARED_API char_t ToChar(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1679
1684 static ASPOSECPP_SHARED_API uint16_t ToUInt16(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1685
1690 static ASPOSECPP_SHARED_API int16_t ToInt16(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1691
1696 static ASPOSECPP_SHARED_API uint32_t ToUInt32(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1697
1702 static ASPOSECPP_SHARED_API int ToInt32(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1703
1708 static ASPOSECPP_SHARED_API uint64_t ToUInt64(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1709
1714 static ASPOSECPP_SHARED_API int64_t ToInt64(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1715
1720 static ASPOSECPP_SHARED_API float ToSingle(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1721
1726 static ASPOSECPP_SHARED_API double ToDouble(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1727
1732 static ASPOSECPP_SHARED_API Decimal ToDecimal(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1733
1738 static ASPOSECPP_SHARED_API DateTime ToDateTime(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1739
1744 static ASPOSECPP_SHARED_API String ToString(const SharedPtr<Object>& obj, const SharedPtr<IFormatProvider>& provider = nullptr);
1745
1746 // ---------------------------------------
1750 static ASPOSECPP_SHARED_API TypeCode GetTypeCode(const SharedPtr<Object>& obj);
1751
1752 // C++ extensions
1753
1754 template <typename Source, typename Target>
1755 static Target To(const Source& value);
1756}; // class Convert
1757
1758} // namespace System
static const String TrueString
String representation of 'true' boolean value.
Definition: boolean.h:48
static const String FalseString
String representation of 'false' boolean value.
Definition: boolean.h:50
static char_t Parse(const String &value)
Converts the first and the only character of the specified string to a char_t value.
Represents a specific date and time value on the time continuum. This type should be allocated on sta...
Definition: date_time.h:50
Represents a decimal number. This type should be allocated on stack and passed to functions by value ...
Definition: decimal.h:107
static const Decimal Zero
Represents number 0.
Definition: decimal.h:123
Represents a Globally Unique IDentifier This type should be allocated on stack and passed to function...
Definition: guid.h:34
Pointer class to wrap types being allocated on heap. Use it to manage memory for classes inheriting O...
Definition: smart_ptr.h:180
String class used across the library. Is a substitute for C# System.String when translating code....
Definition: string.h:122
Represents a particular type and provides information about it.
Definition: type_info.h:109
NumberStyles
Number style allowed when parsing.
Definition: number_styles.h:12
Definition: db_command.h:9
TypeCode
Represents the type of an object.
Definition: type_code.h:19
Base64FormattingOptions
Enumeration containing values that represent different formats of base-64 encoded data.
Definition: convert.h:33
@ InsertLineBreaks
Insert line breaks after every 76th character.
The structure that contains methods performing conversion of values of one type to the values of anot...
Definition: convert.h:44
static uint8_t ToByte(const String &value, Globalization::NumberStyles styles, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent unsi...
static DateTime ToDateTime(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to equivalent DateTime value.
static int8_t ToSByte(uint8_t value)
Converts the specified 8-bit unsigned integer to an equivalent 8-bit signed integer.
static double ToDouble(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::CultureInfo > &culture)
static int64_t ToInt64(const String &value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static DateTime ToDateTime(uint8_t value)
Conversion is not supported. Always throws InvalidCastException.
static char_t ToChar(int32_t value)
Converts the specified 32-bit signed integer to an equivalent unicode character.
static int ToInt32(const String &value, const SharedPtr< Globalization::CultureInfo > &culture)
static uint8_t ToByte(double value)
Converts the specified double number to an equivalent 8-bit unsigned integer.
static constexpr int ToInt32(uint16_t value)
Converts the specified 16-bit unsigned integer to an equivalent 32-bit signed integer.
Definition: convert.h:568
static uint16_t ToUInt16(double value)
Converts the specified double number to an equivalent 16-bit unsigned integer.
static String ToString(bool value, const String &, const SharedPtr< Globalization::CultureInfo > &)
Converts the specified value to its string representation.
Definition: convert.h:1563
static DateTime ToDateTime(const String &value)
Converts the specified string to an instance of DateTime class.
static constexpr bool ToBoolean(float value)
Converts the specified float number to an equivalent boolean value.
Definition: convert.h:153
static DateTime ToDateTime(float value)
Conversion is not supported. Always throws InvalidCastException.
static int ToInt32(double value)
Converts the specified double number to an equivalent 32-bit signed integer.
static String ToBase64String(const ArrayPtr< uint8_t > &in_array, Base64FormattingOptions options)
Base-64 encodes elements in the specified byte array and returns the encoded data as a string.
static Decimal ToDecimal(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to equivalent Decimal value.
static constexpr double ToDouble(int8_t value)
Converts the specified 8-bit signed integer to an equivalent double-precision floating-point number.
Definition: convert.h:960
static String ToString(float value, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to string using the culture-specific format information.
static String ToString(const Decimal &value, const String &format, const SharedPtr< Globalization::CultureInfo > &culture)
static int ToInt32(const String &value, Globalization::NumberStyles styles, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent 32-b...
static int ToInt32(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static double ToDouble(char_t value)
Conversion is not supported. Always throws InvalidCastException.
static String ToString(int8_t value, const String &format, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static int8_t ToSByte(uint64_t value)
Converts the specified 64-bit unsigned integer to an equivalent 8-bit signed integer.
static String ToString(int8_t value, const SharedPtr< Globalization::CultureInfo > &culture)
static uint32_t ToUInt32(const String &value, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent unsi...
static bool ToBoolean(const char_t *value)
Converts the specified c-string to the value of bool type.
Definition: convert.h:171
static String ToString(uint16_t value, const String &format, std::nullptr_t=nullptr)
static String ToString(uint16_t value, const String &format, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static String ToString(const String &value, const SharedPtr< IFormatProvider > &)
Returns the specified value; no conversion is performed.
Definition: convert.h:1479
static int32_t ToInt32(Enum value)
Definition: convert.h:1637
static char_t ToChar(uint64_t value)
Converts the specified 64-bit unsigned integer to an equivalent unicode character.
static constexpr int16_t ToInt16(bool value)
Converts the specified boolean value to an equivalent 16-bit signed integer.
Definition: convert.h:398
static uint16_t ToUInt16(uint64_t value)
Converts the specified 64-bit unsigned integer to an equivalent 16-bit unsigned integer.
static constexpr double ToDouble(uint32_t value)
Converts the specified 32-bit unsigned integer to an equivalent double-precision floating-point numbe...
Definition: convert.h:966
static DateTime ToDateTime(const Decimal &value)
Conversion is not supported. Always throws InvalidCastException.
static DateTime ToDateTime(const String &value, const SharedPtr< Globalization::DateTimeFormatInfo > &dtfi)
static constexpr uint32_t ToUInt32(uint8_t value)
Converts the specified 8-bit unsigned integer to an equivalent 32-bit unsigned integer.
Definition: convert.h:646
static DateTime ToDateTime(const String &value, const SharedPtr< IFormatProvider > &fp)
Converts the specified string to an instance of DateTime class using the provided formatting informat...
static int16_t ToInt16(const String &value, int from_base)
Converts the specified string containing the string representation of a number in the specified base ...
static uint16_t ToUInt16(const String &value, const SharedPtr< Globalization::CultureInfo > &culture)
static String ToString(double value, std::nullptr_t)
Definition: convert.h:1272
static constexpr int ToInt32(int16_t value)
Converts the specified 16-bit signed integer to an equivalent 32-bit signed integer.
Definition: convert.h:570
static String ToString(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to its string representation. If the type of boxed value is String...
static String ToString(int8_t value, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to string using the culture-specific format information.
static String ToString(int8_t value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static String ToString(uint16_t value, const SharedPtr< Globalization::CultureInfo > &culture)
static DateTime ToDateTime(int8_t value)
Conversion is not supported. Always throws InvalidCastException.
static constexpr uint32_t ToUInt32(uint32_t value)
Returns the specified 32-bit unsigned integer.
Definition: convert.h:654
static constexpr uint32_t ToUInt32(std::nullptr_t)
Converts the specified null-string to the equivalent unsigned 32-bit integer value.
Definition: convert.h:674
static constexpr bool ToBoolean(double value)
Converts the specified double number to an equivalent boolean value.
Definition: convert.h:155
static uint16_t ToUInt16(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::CultureInfo > &culture)
static int ToInt32(int64_t value)
Converts the specified 64-bit signed integer to an equivalent 32-bit signed integer.
static constexpr char_t ToChar(uint8_t value)
Converts the specified 8-bit unsigned integer to an equivalent unicode character.
Definition: convert.h:354
static String ToString(const Decimal &value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static constexpr float ToSingle(int64_t value)
Converts the specified 64-bit signed integer to an equivalent single-precision floating-point number.
Definition: convert.h:906
static constexpr int8_t ToSByte(int8_t value)
Returns the specified 8-bit signed integer.
Definition: convert.h:274
static constexpr int ToInt32(int8_t value)
Converts the specified 8-bit signed integer to an equivalent 32-bit signed integer.
Definition: convert.h:566
static constexpr double ToDouble(int16_t value)
Converts the specified 16-bit signed integer to an equivalent double-precision floating-point number.
Definition: convert.h:964
static int64_t ToInt64(const String &value, int from_base)
Converts the specified string containing the string representation of a number in the specified base ...
static String ToString(uint8_t value, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to string using the culture-specific format information.
static constexpr bool ToBoolean(bool value)
Returns the specified boolean value.
Definition: convert.h:135
static constexpr int64_t ToInt64(int8_t value)
Converts the specified 8-bit signed integer to an equivalent 64-bit signed integer.
Definition: convert.h:730
static String ToString(int16_t value, const String &format, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to its string representation using the specified string format and cultu...
static int ToInt32(const String &value)
Converts the specified string containing the string representation of a number to the equivalent 32-b...
static constexpr float ToSingle(float value)
Returns the specified float number.
Definition: convert.h:908
static String ToString(uint64_t value, const String &format, const SharedPtr< Globalization::CultureInfo > &culture)
static uint16_t ToUInt16(const String &value, Globalization::NumberStyles styles, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent unsi...
static uint64_t ToUInt64(const String &value, const SharedPtr< Globalization::CultureInfo > &culture)
static bool ToBoolean(DateTime value)
Conversion is not supported. Always throws InvalidCastException.
static constexpr int16_t ToInt16(int16_t value)
Returns the specified 16-bit signed integer.
Definition: convert.h:406
static String ToString(float value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static uint8_t ToByte(int64_t value)
Converts the specified 64-bit signed integer to an equivalent 8-bit unsigned integer.
static double ToDouble(const String &value, Globalization::NumberStyles styles, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent doub...
static int64_t ToInt64(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static float ToSingle(const String &value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static String ToBase64String(const ArrayPtr< uint8_t > &in_array, int offset_in, int length, Base64FormattingOptions options)
Base-64 encodes a range of elements in the specified byte array and returns the encoded data as a str...
static String ToString(const Decimal &value, std::nullptr_t)
Definition: convert.h:1282
static constexpr uint32_t ToUInt32(bool value)
Converts the specified boolean value to an equivalent 32-bit unsigned integer.
Definition: convert.h:644
static ArrayPtr< uint8_t > FromBase64CharArray(const ArrayPtr< char_t > &in_array, int offset, int length)
Decodes base-64 encoded data represented as a range in the array of Unicode characters.
static uint8_t ToByte(const String &value, std::nullptr_t)
Definition: convert.h:252
static bool ToBoolean(const Decimal &value)
Converts the specified decimal number to an equivalent boolean value.
Definition: convert.h:157
static String ToString(DateTime value)
Converts the specified value to its string representation.
static String ToString(int8_t value, int to_base)
Converts the specified integer value to its string representation in the specified base.
static constexpr float ToSingle(uint64_t value)
Converts the specified 64-bit unsigned integer to an equivalent single-precision floating-point numbe...
Definition: convert.h:904
static uint64_t ToUInt64(const String &value, std::nullptr_t)
Definition: convert.h:872
static String ToString(uint64_t value, const String &format, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static int8_t ToSByte(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::CultureInfo > &culture)
static uint8_t ToByte(uint64_t value)
Converts the specified 64-bit unsigned integer to an equivalent 8-bit unsigned integer.
static String ToBase64String(const ArrayPtr< uint8_t > &in_array, bool insert_line_breaks=false)
Base-64 encodes elements in the specified byte array and returns the encoded data as a string.
static constexpr float ToSingle(std::nullptr_t)
Converts the specified null-string to the equivalent single-precision floating-point value.
Definition: convert.h:920
static uint32_t ToUInt32(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static constexpr float ToSingle(uint32_t value)
Converts the specified 32-bit unsigned integer to an equivalent single-precision floating-point numbe...
Definition: convert.h:900
static int16_t ToInt16(Enum value)
Definition: convert.h:1625
static String ToString(uint32_t value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static constexpr double ToDouble(double value)
Returns the specified double number.
Definition: convert.h:976
static char_t ToChar(uint32_t value)
Converts the specified 32-bit unsigned integer to an equivalent unicode character.
static constexpr uint8_t ToByte(std::nullptr_t)
Converts the specified null-string to the equivalent unsigned 8-bit integer value.
Definition: convert.h:218
static String ToBase64String(const ArrayPtr< uint8_t > &in_array, int offset_in, int length, bool insert_line_breaks=false)
Base-64 encodes a range of elements in the specified byte array and returns the encoded data as a str...
static uint8_t ToByte(const String &value, const SharedPtr< Globalization::CultureInfo > &culture)
static String ToString(int8_t value, const String &format, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to its string representation using the specified string format and cultu...
static uint8_t ToByte(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::CultureInfo > &culture)
static constexpr bool ToBoolean(int32_t value)
Converts the specified 32-bit signed integer to an equivalent boolean value.
Definition: convert.h:147
static uint64_t ToUInt64(int64_t value)
Converts the specified 64-bit signed integer to an equivalent 64-bit unsigned integer.
static String ToString(const char_t(&value)[N], std::nullptr_t=nullptr)
Converts the specified array of unicode characters to string.
Definition: convert.h:1454
static String ToString(float value, const String &format, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to its string representation using the specified string format and cultu...
static uint8_t ToByte(const String &value)
Converts the specified string containing the string representation of a number to the equivalent unsi...
static uint64_t ToUInt64(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::CultureInfo > &culture)
static String ToString(uint32_t value, const String &format, const SharedPtr< Globalization::CultureInfo > &culture)
static uint8_t ToByte(char_t value)
Converts the specified unicode character to an equivalent 8-bit unsigned integer.
static constexpr bool ToBoolean(uint32_t value)
Converts the specified 32-bit unsigned integer to an equivalent boolean value.
Definition: convert.h:145
static int8_t ToSByte(const String &value, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent unsi...
static constexpr int64_t ToInt64(uint32_t value)
Converts the specified 32-bit unsigned integer to an equivalent 64-bit signed integer.
Definition: convert.h:736
static uint64_t ToUInt64(DateTime value)
Conversion is not supported. Always throws InvalidCastException.
static String ToString(int32_t value, const SharedPtr< Globalization::CultureInfo > &culture)
static bool ToBoolean(const String &value)
Converts the specified string to the value of bool type.
static constexpr double ToDouble(int64_t value)
Converts the specified 64-bit signed integer to an equivalent double-precision floating-point number.
Definition: convert.h:972
static constexpr uint16_t ToUInt16(char_t value)
Converts the specified unicode character to an equivalent 16-bit unsigned integer.
Definition: convert.h:504
static int8_t ToSByte(const String &value, const SharedPtr< Globalization::CultureInfo > &culture)
static String ToString(int32_t value, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to string using the culture-specific format information.
static int64_t ToInt64(Enum value)
Definition: convert.h:1649
static String ToString(uint32_t value)
Converts the specified value to its string representation.
static String ToString(bool value, const SharedPtr< Globalization::CultureInfo > &)
Converts the specified value to its string representation.
Definition: convert.h:1542
static String ToString(int16_t value, const String &format, std::nullptr_t=nullptr)
static String ToString(uint32_t value, const String &format, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to its string representation using the specified string format and cultu...
static String ToString(float value, const String &format, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static double ToDouble(const String &value, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent doub...
static int ToBase64CharArray(const ArrayPtr< uint8_t > &in_array, int offset_in, int length, const ArrayPtr< char_t > &out_array, int offset_out, Base64FormattingOptions options)
Base-64 encodes a range of elements in the specified byte array and stores the encoded data as an arr...
static uint32_t ToUInt32(int64_t value)
Converts the specified 64-bit signed integer to an equivalent 32-bit unsigned integer.
static String ToString(bool value, const SharedPtr< IFormatProvider > &)
Converts the specified value to its string representation.
Definition: convert.h:1535
static constexpr uint64_t ToUInt64(uint64_t value)
Returns the specified 64-bit unsigned integer.
Definition: convert.h:822
static SharedPtr< Object > ChangeType(const SharedPtr< Object > &value, const TypeInfo &conversion_type)
NOT IMPLEMENTED.
static String ToString(int8_t value, std::nullptr_t)
Definition: convert.h:1182
static String ToString(float value, std::nullptr_t)
Definition: convert.h:1262
static int8_t ToSByte(double value)
Converts the specified double number to an equivalent 8-bit signed integer.
static uint64_t ToUInt64(float value)
Converts the specified float number to an equivalent 64-bit unsigned integer.
static int8_t ToSByte(int64_t value)
Converts the specified 64-bit signed integer to an equivalent 8-bit signed integer.
static uint64_t ToUInt64(const String &value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static int8_t ToSByte(const String &value, Globalization::NumberStyles styles, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent 8-bi...
static constexpr uint8_t ToByte(bool value)
Converts the specified boolean value to an equivalent 8-bit unsigned integer.
Definition: convert.h:188
static String ToString(char_t value, const String &, std::nullptr_t)
Returns the specified value; no conversion is performed.
Definition: convert.h:1520
static Decimal ToDecimal(int32_t value)
Converts the specified 32-bit signed integer to an equivalent decimal number.
Definition: convert.h:1034
static String ToString(float value, const String &format, std::nullptr_t=nullptr)
static uint8_t ToByte(int16_t value)
Converts the specified 16-bit signed integer to an equivalent 8-bit unsigned integer.
static uint16_t ToUInt16(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to equivalent unsigned 16-bit integer value.
static uint64_t ToUInt64(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static bool ToBoolean(const String &value, const SharedPtr< IFormatProvider > &)
Converts the specified string to the value of bool type.
Definition: convert.h:183
static int ToInt32(const String &value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static uint32_t ToUInt32(const char_t *value)
Converts the specified c-string containing the string representation of a number to the equivalent un...
Definition: convert.h:681
static Decimal ToDecimal(const Decimal &value)
Returns the specified decimal number.
Definition: convert.h:1044
static String ToString(int32_t value, const String &format, std::nullptr_t=nullptr)
static int ToBase64CharArray(const ArrayPtr< uint8_t > &in_array, int offset_in, int length, const ArrayPtr< char16_t > &out_array, int offset_out, bool insert_line_breaks=false)
Base-64 encodes a range of elements in the specified byte array and stores the encoded data as an arr...
static int8_t ToSByte(const String &value, Globalization::NumberStyles styles, std::nullptr_t=nullptr)
static uint16_t ToUInt16(DateTime value)
Conversion is not supported. Always throws InvalidCastException.
static constexpr double ToDouble(int32_t value)
Converts the specified 32-bit signed integer to an equivalent double-precision floating-point number.
Definition: convert.h:968
static String ToString(DateTime value, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to string using the culture-specific format information.
static int ToInt32(const String &value, int from_base)
Converts the specified string containing the string representation of a number in the specified base ...
static String ToString(const char_t(&value)[N], const SharedPtr< Globalization::CultureInfo > &)
Definition: convert.h:1468
static double ToDouble(const String &value)
Converts the specified string containing the string representation of a number to the equivalent doub...
static double ToDouble(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static DateTime ToDateTime(uint16_t value)
Conversion is not supported. Always throws InvalidCastException.
static int16_t ToInt16(const String &value)
Converts the specified string containing the string representation of a number to the equivalent 16-b...
static int16_t ToInt16(const String &value, Globalization::NumberStyles styles, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent 16-b...
static uint32_t ToUInt32(Enum value)
Definition: convert.h:1631
static uint32_t ToUInt32(const String &value, Globalization::NumberStyles styles, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent unsi...
static int64_t ToInt64(const String &value)
Converts the specified string containing the string representation of a number to the equivalent 64-b...
static uint64_t ToUInt64(const String &value)
Converts the specified string containing the string representation of a number to the equivalent unsi...
static int64_t ToInt64(const String &value, const SharedPtr< Globalization::CultureInfo > &culture)
static uint16_t ToUInt16(const String &value, Globalization::NumberStyles styles, std::nullptr_t=nullptr)
static String ToString(int64_t value, const String &format, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to its string representation using the specified string format and cultu...
static uint32_t ToUInt32(int32_t value)
Converts the specified 32-bit signed integer to an equivalent 32-bit unsigned integer.
static uint64_t ToUInt64(const char_t *value)
Converts the specified c-string containing the string representation of a number to the equivalent un...
Definition: convert.h:845
static String ToString(int64_t value, const String &format, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static int8_t ToSByte(DateTime value)
Conversion is not supported. Always throws InvalidCastException.
static double ToDouble(const String &value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static int ToInt32(const String &value, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent 32-b...
static String ToString(double value, const String &format, const SharedPtr< Globalization::CultureInfo > &culture)
static String ToString(uint8_t value, int to_base)
Definition: convert.h:1600
static constexpr bool ToBoolean(int64_t value)
Converts the specified 64-bit signed integer to an equivalent boolean value.
Definition: convert.h:151
static std::enable_if_t<!IsSmartPtr< T >::value, bool > IsDBNull(const T &)
NOT IMPLEMENTED.
Definition: convert.h:57
static bool IsDBNull(const SharedPtr< T > &value)
NOT IMPLEMENTED Fake implementation, checks if value is nullptr.
Definition: convert.h:65
static int8_t ToSByte(float value)
Converts the specified float number to an equivalent 8-bit signed integer.
static constexpr int ToInt32(bool value)
Converts the specified boolean value to an equivalent 32-bit signed integer.
Definition: convert.h:562
static int64_t ToInt64(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to equivalent 64-bit integer value.
static String ToString(int64_t value, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to string using the culture-specific format information.
static String ToString(uint8_t value, const String &format, const SharedPtr< Globalization::CultureInfo > &culture)
static uint32_t ToUInt32(const String &value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static String ToString(const char_t(&value)[N], const SharedPtr< IFormatProvider > &)
Converts the specified array of unicode characters to string using the specified culture-specific for...
Definition: convert.h:1463
static String ToString(const Decimal &value, const String &format, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to its string representation using the specified string format and cultu...
static int16_t ToInt16(int32_t value)
Converts the specified 32-bit signed integer to an equivalent 16-bit signed integer.
static double ToDouble(DateTime value)
Conversion is not supported. Always throws InvalidCastException.
static uint8_t ToByte(const char_t *value)
Converts the specified c-string containing the string representation of a number to the equivalent un...
Definition: convert.h:225
static String ToString(double value, const String &format, std::nullptr_t=nullptr)
static Decimal ToDecimal(float value)
Converts the specified float number to an equivalent decimal number.
Definition: convert.h:1040
static constexpr bool ToBoolean(uint8_t value)
Converts the specified 8-bit unsigned integer to an equivalent boolean value.
Definition: convert.h:137
static int ToInt32(const Decimal &value)
Converts the specified decimal number to an equivalent 32-bit signed integer.
static String ToString(char_t value, const String &, const SharedPtr< IFormatProvider > &)
Returns the specified value; no conversion is performed.
Definition: convert.h:1510
static uint64_t ToUInt64(int16_t value)
Converts the specified 16-bit signed integer to an equivalent 64-bit unsigned integer.
static int64_t ToInt64(const char_t *value)
Converts the specified c-string containing the string representation of a number to the equivalent 64...
Definition: convert.h:763
static int16_t ToInt16(const String &value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static Decimal ToDecimal(char_t value)
Conversion is not supported. Always throws InvalidCastException.
static String ToString(int64_t value, int to_base)
Converts the specified integer value to its string representation in the specified base.
static String ToString(const Guid &value)
Converts the specified value to string.
static constexpr double ToDouble(uint64_t value)
Converts the specified 64-bit unsigned integer to an equivalent double-precision floating-point numbe...
Definition: convert.h:970
static constexpr uint64_t ToUInt64(bool value)
Converts the specified boolean value to an equivalent 64-bit unsigned integer.
Definition: convert.h:808
static TypeCode GetTypeCode(const SharedPtr< Object > &obj)
Returns a TypeCode value representing the type of the specified boxed value.
static uint16_t ToUInt16(const char_t *value)
Converts the specified c-string containing the string representation of a number to the equivalent un...
Definition: convert.h:517
static uint8_t ToByte(const String &value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static DateTime ToDateTime(const String &value, std::nullptr_t)
Definition: convert.h:1121
static uint8_t ToByte(int8_t value)
Converts the specified 8-bit signed integer to an equivalent 8-bit unsigned integer.
static SharedPtr< Object > ChangeType(const SharedPtr< Object > &value, const TypeInfo &conversion_type, const SharedPtr< IFormatProvider > &provider)
static String ToString(int8_t value, const String &format, const SharedPtr< Globalization::CultureInfo > &culture)
static uint16_t ToUInt16(const Decimal &value)
Converts the specified decimal number to an equivalent 16-bit unsigned integer.
static int8_t ToSByte(const String &value, std::nullptr_t)
Definition: convert.h:334
static int8_t ToSByte(const char_t *value)
Converts the specified c-string containing the string representation of a number to the equivalent 8-...
Definition: convert.h:307
static String ToString(int32_t value, std::nullptr_t)
Definition: convert.h:1222
static char_t ToChar(float value)
Conversion is not supported. Always throws InvalidCastException.
static String ToString(uint64_t value, std::nullptr_t)
Definition: convert.h:1252
static uint16_t ToUInt16(int8_t value)
Converts the specified 8-bit signed integer to an equivalent 16-bit unsigned integer.
static float ToSingle(char_t value)
Conversion is not supported. Always throws InvalidCastException.
static String ToString(DateTime value, const SharedPtr< Globalization::CultureInfo > &culture)
static String ToString(uint64_t value, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to string using the culture-specific format information.
static int ToInt32(uint32_t value)
Converts the specified 32-bit unsigned integer to an equivalent 32-bit signed integer.
static int64_t ToInt64(double value)
Converts the specified double number to an equivalent 64-bit signed integer.
static int16_t ToInt16(DateTime value)
Conversion is not supported. Always throws InvalidCastException.
static String ToString(uint16_t value)
Converts the specified value to its string representation.
static uint16_t ToUInt16(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static String ToString(const String &value, std::nullptr_t=nullptr)
Returns the specified value; no conversion is performed.
Definition: convert.h:1474
static char_t ToChar(const Decimal &value)
Conversion is not supported. Always throws InvalidCastException.
static uint64_t ToUInt64(Enum value)
Definition: convert.h:1643
static int16_t ToInt16(uint32_t value)
Converts the specified 32-bit unsigned integer to an equivalent 16-bit signed integer.
static String ToString(int32_t value, const String &format, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to its string representation using the specified string format and cultu...
static String ToString(uint8_t value, const String &format, std::nullptr_t=nullptr)
static uint64_t ToUInt64(const String &value, Globalization::NumberStyles styles, std::nullptr_t=nullptr)
static constexpr uint64_t ToUInt64(std::nullptr_t)
Converts the specified null-string to the equivalent unsigned 64-bit integer value.
Definition: convert.h:838
static Target To(const Source &value)
static uint8_t ToByte(float value)
Converts the specified float number to an equivalent 8-bit unsigned integer.
static String ToString(uint8_t value, const SharedPtr< Globalization::CultureInfo > &culture)
static String ToString(int16_t value, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to string using the culture-specific format information.
static String ToString(DateTime value, std::nullptr_t)
Definition: convert.h:1292
static constexpr int64_t ToInt64(bool value)
Converts the specified boolean value to an equivalent 64-bit signed integer.
Definition: convert.h:726
static int8_t ToSByte(int16_t value)
Converts the specified 16-bit signed integer to an equivalent 8-bit signed integer.
static int64_t ToInt64(DateTime value)
Conversion is not supported. Always throws InvalidCastException.
static DateTime ToDateTime(char_t value)
Conversion is not supported. Always throws InvalidCastException.
static DateTime ToDateTime(double value)
Conversion is not supported. Always throws InvalidCastException.
static uint32_t ToUInt32(const String &value, const SharedPtr< Globalization::CultureInfo > &culture)
static int64_t ToInt64(const String &value, Globalization::NumberStyles styles, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent 64-b...
static constexpr int64_t ToInt64(uint16_t value)
Converts the specified 16-bit unsigned integer to an equivalent 64-bit signed integer.
Definition: convert.h:732
static String ToString(uint32_t value, const String &format, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static String ToString(char_t value, std::nullptr_t=nullptr)
Returns the specified value; no conversion is performed.
Definition: convert.h:1495
static String ToString(int32_t value, int to_base)
Converts the specified integer value to its string representation in the specified base.
static Decimal ToDecimal(int8_t value)
Converts the specified 8-bit signed integer to an equivalent decimal number.
Definition: convert.h:1026
static String ToString(DateTime value, const String &format, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static constexpr int64_t ToInt64(int32_t value)
Converts the specified 32-bit signed integer to an equivalent 64-bit signed integer.
Definition: convert.h:738
static String ToString(uint8_t value)
Converts the specified value to its string representation.
static constexpr double ToDouble(float value)
Converts the specified single-precision number to an equivalent double-precision floating-point numbe...
Definition: convert.h:974
static String ToString(DateTime value, const String &format, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to its string representation using the specified string format and cultu...
static int16_t ToInt16(const String &value, const SharedPtr< Globalization::CultureInfo > &culture)
static String ToString(DateTime value, const String &format, const SharedPtr< Globalization::CultureInfo > &culture)
static String ToString(const Decimal &value)
Converts the specified value to its string representation.
static constexpr float ToSingle(double value)
Converts the specified double-precision number to an equivalent single-precision floating-point numbe...
Definition: convert.h:910
static DateTime ToDateTime(const String &value, const SharedPtr< Globalization::CultureInfo > &culture)
static uint16_t ToUInt16(const String &value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static constexpr uint8_t ToByte(uint8_t value)
Returns the specified 8-bit unsigned integer.
Definition: convert.h:190
static float ToSingle(const Decimal &value)
Converts the specified decimal number to an equivalent single-precision floating-point number.
Definition: convert.h:912
static constexpr bool ToBoolean(int16_t value)
Converts the specified 16-bit signed integer to an equivalent boolean value.
Definition: convert.h:143
static Decimal ToDecimal(bool value)
Converts the specified boolean value to an equivalent decimal number.
Definition: convert.h:1022
static double ToDouble(const Decimal &value)
Converts the specified decimal number to an equivalent double-precision floating-point number.
Definition: convert.h:978
static constexpr char_t ToChar(uint16_t value)
Converts the specified 16-bit unsigned integer to an equivalent unicode character.
Definition: convert.h:358
static int16_t ToInt16(const String &value, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent 16-b...
static int8_t ToSByte(char_t value)
Converts the specified unicode character to an equivalent 8-bit signed integer.
static DateTime ToDateTime(int16_t value)
Conversion is not supported. Always throws InvalidCastException.
static float ToSingle(const String &value, std::nullptr_t)
Definition: convert.h:940
static char_t ToChar(const char_t *value)
Converts the first and the only character of the specified c-string to a char_t value.
static DateTime ToDateTime(bool value)
Conversion is not supported. Always throws InvalidCastException.
static String ToString(char_t value, const SharedPtr< IFormatProvider > &)
Returns the specified value; no conversion is performed.
Definition: convert.h:1500
static uint32_t ToUInt32(double value)
Converts the specified double number to an equivalent 32-bit unsigned integer.
static Decimal ToDecimal(uint8_t value)
Converts the specified 8-bit unsigned integer to an equivalent decimal number.
Definition: convert.h:1024
static constexpr int ToInt32(std::nullptr_t)
Converts the specified null-string to the equivalent 32-bit integer value.
Definition: convert.h:592
static uint32_t ToUInt32(float value)
Converts the specified float number to an equivalent 32-bit unsigned integer.
static uint64_t ToUInt64(int8_t value)
Converts the specified 8-bit signed integer to an equivalent 64-bit unsigned integer.
static String ToString(int16_t value, const SharedPtr< Globalization::CultureInfo > &culture)
static char_t ToChar(int8_t value)
Converts the specified 8-bit signed integer to an equivalent unicode character.
static String ToString(int8_t value)
Converts the specified value to its string representation.
static constexpr bool ToBoolean(uint64_t value)
Converts the specified 64-bit unsigned integer to an equivalent boolean value.
Definition: convert.h:149
static String ToString(int32_t value, const String &format, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static DateTime ToDateTime(uint64_t value)
Conversion is not supported. Always throws InvalidCastException.
static int ToInt32(DateTime value)
Conversion is not supported. Always throws InvalidCastException.
static int8_t ToSByte(const String &value)
Converts the specified string containing the string representation of a number to the equivalent 8-bi...
static uint8_t ToByte(int32_t value)
Converts the specified 32-bit signed integer to an equivalent 8-bit unsigned integer.
static String ToString(uint64_t value)
Converts the specified value to its string representation.
static int ToInt32(const String &value, std::nullptr_t)
Definition: convert.h:626
static int16_t ToInt16(uint16_t value)
Converts the specified 16-bit unsigned integer to an equivalent 16-bit signed integer.
static char_t ToChar(DateTime value)
Conversion is not supported. Always throws InvalidCastException.
static uint16_t ToUInt16(const String &value, std::nullptr_t)
Definition: convert.h:544
static String ToString(uint32_t value, int to_base)
Definition: convert.h:1602
static uint64_t ToUInt64(const String &value, Globalization::NumberStyles styles, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent unsi...
static uint64_t ToUInt64(const String &value, int from_base)
Converts the specified string containing the string representation of a number in the specified base ...
static constexpr double ToDouble(bool value)
Converts the specified boolean value to an equivalent double-precision floating-point number.
Definition: convert.h:956
static constexpr float ToSingle(uint8_t value)
Converts the specified 8-bit unsigned integer to an equivalent single-precision floating-point number...
Definition: convert.h:892
static DateTime ToDateTime(int32_t value)
Conversion is not supported. Always throws InvalidCastException.
static constexpr uint16_t ToUInt16(std::nullptr_t)
Converts the specified null-string to the equivalent unsigned 16-bit integer value.
Definition: convert.h:510
static uint32_t ToUInt32(int8_t value)
Converts the specified 8-bit signed integer to an equivalent 32-bit unsigned integer.
static String ToString(const Decimal &value, const String &format, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static constexpr int ToInt32(uint8_t value)
Converts the specified 8-bit unsigned integer to an equivalent 32-bit signed integer.
Definition: convert.h:564
static constexpr bool ToBoolean(std::nullptr_t)
Converts the specified null-string to the equivalent boolean value.
Definition: convert.h:165
static constexpr int ToInt32(int32_t value)
Returns the specified 32-bit signed integer.
Definition: convert.h:574
static String ToString(double value, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to string using the culture-specific format information.
static double ToDouble(const char_t *value)
Converts the specified c-string containing the string representation of a number to the equivalent do...
Definition: convert.h:991
static DateTime ToDateTime(int64_t value)
Conversion is not supported. Always throws InvalidCastException.
static String ToString(int16_t value, const String &format, const SharedPtr< Globalization::CultureInfo > &culture)
static int ToInt32(float value)
Converts the specified float number to an equivalent 32-bit signed integer.
static uint16_t ToUInt16(const String &value, int from_base)
Converts the specified string containing the string representation of a number in the specified base ...
static int8_t ToSByte(Enum value)
Definition: convert.h:1613
static float ToSingle(const String &value, Globalization::NumberStyles styles, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent sing...
static int16_t ToInt16(uint64_t value)
Converts the specified 64-bit unsigned integer to an equivalent 16-bit signed integer.
static String ToString(uint16_t value, const String &format, const SharedPtr< Globalization::CultureInfo > &culture)
static uint16_t ToUInt16(int64_t value)
Converts the specified 64-bit signed integer to an equivalent 16-bit unsigned integer.
static String ToString(int64_t value, std::nullptr_t)
Definition: convert.h:1242
static float ToSingle(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to single-precision floating-point value.
static constexpr float ToSingle(uint16_t value)
Converts the specified 16-bit unsigned integer to an equivalent single-precision floating-point numbe...
Definition: convert.h:896
static constexpr DateTime ToDateTime(DateTime value)
Returns the specified date and time.
Definition: convert.h:1106
static int16_t ToInt16(double value)
Converts the specified double number to an equivalent 16-bit signed integer.
static int64_t ToInt64(float value)
Converts the specified float number to an equivalent 64-bit signed integer.
static uint32_t ToUInt32(const String &value)
Converts the specified string containing the string representation of a number to the equivalent unsi...
static float ToSingle(const String &value, Globalization::NumberStyles styles, std::nullptr_t=nullptr)
static String ToString(uint32_t value, std::nullptr_t)
Definition: convert.h:1232
static Decimal ToDecimal(const String &value)
Converts the specified string containing the string representation of a number to the equivalent Deci...
static uint8_t ToByte(const String &value, Globalization::NumberStyles styles, std::nullptr_t=nullptr)
static int ToInt32(uint64_t value)
Converts the specified 64-bit unsigned integer to an equivalent 32-bit signed integer.
static int64_t ToInt64(const Decimal &value)
Converts the specified decimal number to an equivalent 64-bit signed integer.
static String ToString(int64_t value, const String &format, std::nullptr_t=nullptr)
static String ToString(uint32_t value, const String &format, std::nullptr_t=nullptr)
static int64_t ToInt64(uint64_t value)
Converts the specified 64-bit unsigned integer to an equivalent 64-bit signed integer.
static float ToSingle(const char_t *value)
Converts the specified c-string containing the string representation of a number to the equivalent si...
Definition: convert.h:925
static String ToString(uint8_t value, const String &format, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static uint8_t ToByte(const String &value, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent unsi...
static String ToString(uint16_t value, int to_base)
Definition: convert.h:1601
static constexpr float ToSingle(int8_t value)
Converts the specified 8-bit signed integer to an equivalent single-precision floating-point number.
Definition: convert.h:894
static float ToSingle(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::CultureInfo > &culture)
static constexpr uint16_t ToUInt16(uint16_t value)
Returns the specified 16-bit unsigned integer.
Definition: convert.h:486
static Decimal ToDecimal(std::nullptr_t)
Converts the specified null-string to the equivalent Decimal value.
Definition: convert.h:1052
static int8_t ToSByte(uint32_t value)
Converts the specified 32-bit unsigned integer to an equivalent 8-bit signed integer.
static constexpr int64_t ToInt64(int64_t value)
Returns the specified 64-bit signed integer.
Definition: convert.h:742
static String ToString(const String &value, const SharedPtr< Globalization::NumberFormatInfo > &)
Returns the specified value; no conversion is performed.
Definition: convert.h:1489
static uint32_t ToUInt32(const String &value, std::nullptr_t)
Definition: convert.h:708
static String ToString(uint8_t value, std::nullptr_t)
Definition: convert.h:1192
static int64_t ToInt64(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::CultureInfo > &culture)
static uint16_t ToUInt16(const String &value)
Converts the specified string containing the string representation of a number to the equivalent unsi...
static uint16_t ToUInt16(const String &value, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent unsi...
static constexpr bool ToBoolean(uint16_t value)
Converts the specified 16-bit unsigned integer to an equivalent boolean value.
Definition: convert.h:141
static String ToString(int64_t value)
Converts the specified value to its string representation.
static String ToString(uint32_t value, const SharedPtr< Globalization::CultureInfo > &culture)
static float ToSingle(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static uint64_t ToUInt64(const String &value, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent unsi...
static String ToString(DateTime value, const SharedPtr< Globalization::DateTimeFormatInfo > &dtfi)
static String ToString(int16_t value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static String ToString(double value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static constexpr double ToDouble(uint16_t value)
Converts the specified 16-bit unsigned integer to an equivalent double-precision floating-point numbe...
Definition: convert.h:962
static int16_t ToInt16(int64_t value)
Converts the specified 64-bit signed integer to an equivalent 16-bit signed integer.
static String ToString(uint64_t value, const String &format, std::nullptr_t=nullptr)
static Decimal ToDecimal(const String &value, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent Deci...
static uint16_t ToUInt16(int32_t value)
Converts the specified 32-bit signed integer to an equivalent 16-bit unsigned integer.
static constexpr int64_t ToInt64(std::nullptr_t)
Converts the specified null-string to the equivalent int 64-bit integer value.
Definition: convert.h:756
static uint64_t ToUInt64(int32_t value)
Converts the specified 32-bit signed integer to an equivalent 64-bit unsigned integer.
static String ToString(uint16_t value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static constexpr int64_t ToInt64(int16_t value)
Converts the specified 16-bit signed integer to an equivalent 64-bit signed integer.
Definition: convert.h:734
static String ToString(uint64_t value, const String &format, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to its string representation using the specified string format and cultu...
static char_t ToChar(bool value)
Conversion is not supported. Always throws InvalidCastException.
static uint64_t ToUInt64(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to equivalent unsigned 64-bit integer value.
static uint64_t ToUInt64(double value)
Converts the specified double number to an equivalent 64-bit unsigned integer.
static uint8_t ToByte(uint16_t value)
Converts the specified 16-bit unsigned integer to an equivalent 8-bit unsigned integer.
static uint64_t ToUInt64(const Decimal &value)
Converts the specified decimal number to an equivalent 64-bit unsigned integer.
static Decimal ToDecimal(const String &value, Globalization::NumberStyles styles, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent Deci...
static String ToString(double value, const String &format, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static uint8_t ToByte(const Decimal &value)
Converts the specified decimal number to an equivalent 8-bit unsigned integer.
static Decimal ToDecimal(uint16_t value)
Converts the specified 16-bit unsigned integer to an equivalent decimal number.
Definition: convert.h:1028
static String ToString(int16_t value, std::nullptr_t)
Definition: convert.h:1202
static int16_t ToInt16(const Decimal &value)
Converts the specified decimal number to an equivalent 16-bit signed integer.
static int ToInt32(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to equivalent 32-bit integer value.
static String ToString(uint8_t value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static int16_t ToInt16(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::CultureInfo > &culture)
static int16_t ToInt16(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to equivalent 16-bit integer value.
static int16_t ToInt16(float value)
Converts the specified float number to an equivalent 16-bit signed integer.
static int8_t ToSByte(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static String ToString(char_t value, const String &, const SharedPtr< Globalization::CultureInfo > &)
Returns the specified value; no conversion is performed.
Definition: convert.h:1515
static int ToInt32(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::CultureInfo > &culture)
static int64_t ToInt64(const String &value, Globalization::NumberStyles styles, std::nullptr_t=nullptr)
static constexpr uint16_t ToUInt16(bool value)
Converts the specified boolean value to an equivalent 16-bit unsigned integer.
Definition: convert.h:480
static String ToString(uint8_t value, const String &format, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to its string representation using the specified string format and cultu...
static uint8_t ToByte(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to equivalent unsigned 8-bit integer value.
static uint8_t ToByte(DateTime value)
Conversion is not supported. Always throws InvalidCastException.
static String ToString(int32_t value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static String ToString(int8_t value, const String &format, std::nullptr_t=nullptr)
static uint16_t ToUInt16(int16_t value)
Converts the specified 16-bit signed integer to an equivalent 16-bit unsigned integer.
static String ToString(const Guid &value, const String &format)
Converts the specified value to string using the specified string format.
static constexpr int16_t ToInt16(uint8_t value)
Converts the specified 8-bit unsigned integer to an equivalent 16-bit signed integer.
Definition: convert.h:400
static int64_t ToInt64(const String &value, std::nullptr_t)
Definition: convert.h:790
static constexpr uint32_t ToUInt32(uint16_t value)
Converts the specified 16-bit unsigned integer to an equivalent 32-bit unsigned integer.
Definition: convert.h:650
static int8_t ToSByte(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to equivalent 8-bit integer value.
static uint8_t ToByte(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static int ToInt32(const String &value, Globalization::NumberStyles styles, std::nullptr_t=nullptr)
static Decimal ToDecimal(uint32_t value)
Converts the specified 32-bit unsigned integer to an equivalent decimal number.
Definition: convert.h:1032
static String ToString(float value, const SharedPtr< Globalization::CultureInfo > &culture)
static constexpr int8_t ToSByte(bool value)
Converts the specified boolean value to an equivalent 8-bit signed integer.
Definition: convert.h:270
static bool ToBoolean(char_t value)
Conversion is not supported. Always throws InvalidCastException.
static constexpr bool ToBoolean(int8_t value)
Converts the specified 8-bit signed integer to an equivalent boolean value.
Definition: convert.h:139
static constexpr float ToSingle(int32_t value)
Converts the specified 32-bit signed integer to an equivalent single-precision floating-point number.
Definition: convert.h:902
static constexpr double ToDouble(uint8_t value)
Converts the specified 8-bit unsigned integer to an equivalent double-precision floating-point number...
Definition: convert.h:958
static bool ToBoolean(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to equivalent boolean value.
static String ToString(char_t value, const SharedPtr< Globalization::CultureInfo > &)
Returns the specified value; no conversion is performed.
Definition: convert.h:1505
static int ToInt32(const char_t *value)
Converts the specified c-string containing the string representation of a number to the equivalent 32...
Definition: convert.h:599
static uint16_t ToUInt16(Enum value)
Definition: convert.h:1619
static char_t ToChar(const String &value)
Converts the first and the only character of the specified string to a char_t value.
Definition: convert.h:388
static String ToString(const String &value, const SharedPtr< Globalization::CultureInfo > &)
Returns the specified value; no conversion is performed.
Definition: convert.h:1484
static uint32_t ToUInt32(int16_t value)
Converts the specified 16-bit signed integer to an equivalent 32-bit unsigned integer.
static Decimal ToDecimal(const char_t *value)
Converts the specified c-string containing the string representation of a number to the equivalent De...
Definition: convert.h:1057
static uint32_t ToUInt32(const String &value, Globalization::NumberStyles styles, std::nullptr_t=nullptr)
static int16_t ToInt16(const String &value, std::nullptr_t)
Definition: convert.h:462
static constexpr uint16_t ToUInt16(uint8_t value)
Converts the specified 8-bit unsigned integer to an equivalent 16-bit unsigned integer.
Definition: convert.h:482
static String ToString(int16_t value, const String &format, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static int64_t ToInt64(const String &value, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent 64-b...
static Decimal ToDecimal(double value)
Converts the specified double number to an equivalent decimal number.
Definition: convert.h:1042
static uint32_t ToUInt32(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::CultureInfo > &culture)
static String ToString(uint32_t value, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to string using the culture-specific format information.
static constexpr uint64_t ToUInt64(uint16_t value)
Converts the specified 16-bit unsigned integer to an equivalent 64-bit unsigned integer.
Definition: convert.h:814
static uint8_t ToByte(const String &value, int from_base)
Converts the specified string containing the string representation of a number in the specified base ...
static String ToString(uint64_t value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static int8_t ToSByte(const Decimal &value)
Converts the specified decimal number to an equivalent 8-bit signed integer.
static String ToString(int32_t value, const String &format, const SharedPtr< Globalization::CultureInfo > &culture)
static String ToString(const Decimal &value, const String &format, std::nullptr_t=nullptr)
static constexpr int8_t ToSByte(std::nullptr_t)
Converts the specified null-string to the equivalent 8-bit integer value.
Definition: convert.h:300
static String ToString(bool value, const SharedPtr< Globalization::NumberFormatInfo > &)
Converts the specified value to its string representation.
Definition: convert.h:1549
static constexpr float ToSingle(bool value)
Converts the specified boolean value to an equivalent single-precision floating-point number.
Definition: convert.h:890
static int16_t ToInt16(const char_t *value)
Converts the specified c-string containing the string representation of a number to the equivalent 16...
Definition: convert.h:435
static constexpr int16_t ToInt16(int8_t value)
Converts the specified 8-bit signed integer to an equivalent 16-bit signed integer.
Definition: convert.h:402
static String ToString(const Decimal &value, const SharedPtr< Globalization::CultureInfo > &culture)
static char_t ToChar(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to equivalent unicode character.
static int8_t ToSByte(int32_t value)
Converts the specified 32-bit signed integer to an equivalent 8-bit signed integer.
static String ToString(bool value, const String &, std::nullptr_t)
Converts the specified value to its string representation.
Definition: convert.h:1570
static uint32_t ToUInt32(const String &value, int from_base)
Converts the specified string containing the string representation of a number in the specified base ...
static constexpr char_t ToChar(char_t value)
Returns the specified unicode character.
Definition: convert.h:376
static int16_t ToInt16(const String &value, Globalization::NumberStyles styles, std::nullptr_t=nullptr)
static String ToString(int64_t value, const SharedPtr< Globalization::CultureInfo > &culture)
static double ToDouble(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to double-precision floating-point value. If the type of boxed val...
static uint16_t ToUInt16(uint32_t value)
Converts the specified 32-bit unsigned integer to an equivalent 16-bit unsigned integer.
static uint32_t ToUInt32(uint64_t value)
Converts the specified 64-bit unsigned integer to an equivalent 32-bit unsigned integer.
static char_t ToChar(const String &value, const SharedPtr< IFormatProvider > &)
Converts the first and the only character of the specified string to a char_t value.
Definition: convert.h:393
static String ToString(int64_t value, const String &format, const SharedPtr< Globalization::CultureInfo > &culture)
static String ToString(uint16_t value, const String &format, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to its string representation using the specified string format and cultu...
static String ToString(int16_t value, int to_base)
Converts the specified integer value to its string representation in the specified base.
static int16_t ToInt16(const String &value, Globalization::NumberStyles styles, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static int16_t ToInt16(char_t value)
Converts the specified unicode character to an equivalent 16-bit signed integer.
static Decimal ToDecimal(int64_t value)
Converts the specified 64-bit signed integer to an equivalent decimal number.
Definition: convert.h:1038
static String ToString(double value, const String &format, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to its string representation using the specified string format and cultu...
static constexpr double ToDouble(std::nullptr_t)
Converts the specified null-string to the equivalent double-precision floating-point value.
Definition: convert.h:986
static String ToString(DateTime value, const String &format, std::nullptr_t=nullptr)
static ArrayPtr< uint8_t > FromBase64String(const String &s)
Decodes base-64 encoded data represented as a string.
static String ToString(bool value, const String &, const SharedPtr< IFormatProvider > &)
Converts the specified value to its string representation.
Definition: convert.h:1556
static int8_t ToSByte(const String &value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static constexpr int16_t ToInt16(std::nullptr_t)
Converts the specified null-string to the equivalent 16-bit integer value.
Definition: convert.h:428
static String ToString(bool value, std::nullptr_t=nullptr)
Converts the specified value to its string representation.
Definition: convert.h:1528
static float ToSingle(DateTime value)
Conversion is not supported. Always throws InvalidCastException.
static String ToString(float value)
Converts the specified value to its string representation.
static float ToSingle(const String &value, const SharedPtr< IFormatProvider > &provider)
Converts the specified string containing the string representation of a number to the equivalent sing...
static constexpr float ToSingle(int16_t value)
Converts the specified 16-bit signed integer to an equivalent single-precision floating-point number.
Definition: convert.h:898
static String ToString(double value)
Converts the specified value to its string representation.
static String ToString(int64_t value, const SharedPtr< Globalization::NumberFormatInfo > &nfi)
static char_t ToChar(int64_t value)
Converts the specified 64-bit signed integer to an equivalent unicode character.
static uint8_t ToByte(Enum value)
Definition: convert.h:1607
static float ToSingle(const String &value, const SharedPtr< Globalization::CultureInfo > &culture)
static Decimal ToDecimal(int16_t value)
Converts the specified 16-bit signed integer to an equivalent decimal number.
Definition: convert.h:1030
static String ToString(uint16_t value, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to string using the culture-specific format information.
static char_t ToChar(double value)
Conversion is not supported. Always throws InvalidCastException.
static constexpr int64_t ToInt64(uint8_t value)
Converts the specified 8-bit unsigned integer to an equivalent 64-bit signed integer.
Definition: convert.h:728
static float ToSingle(const String &value)
Converts the specified string containing the string representation of a number to the equivalent sing...
static uint32_t ToUInt32(DateTime value)
Conversion is not supported. Always throws InvalidCastException.
static String ToString(const Decimal &value, const SharedPtr< IFormatProvider > &provider)
Converts the specified value to string using the culture-specific format information.
static String ToString(int16_t value)
Converts the specified value to its string representation.
static Decimal ToDecimal(DateTime value)
Conversion is not supported. Always throws InvalidCastException.
static String ToString(float value, const String &format, const SharedPtr< Globalization::CultureInfo > &culture)
static String ToString(double value, const SharedPtr< Globalization::CultureInfo > &culture)
static constexpr uint64_t ToUInt64(char_t value)
Converts the specified unicode character to an equivalent 64-bit unsigned integer.
Definition: convert.h:832
static constexpr uint32_t ToUInt32(char_t value)
Converts the specified unicode character to an equivalent 32-bit unsigned integer.
Definition: convert.h:668
static double ToDouble(const String &value, const SharedPtr< Globalization::CultureInfo > &culture)
static Decimal ToDecimal(uint64_t value)
Converts the specified 64-bit unsigned integer to an equivalent decimal number.
Definition: convert.h:1036
static int8_t ToSByte(uint16_t value)
Converts the specified 16-bit unsigned integer to an equivalent 8-bit signed integer.
static String ToString(uint64_t value, const SharedPtr< Globalization::CultureInfo > &culture)
static uint8_t ToByte(uint32_t value)
Converts the specified 32-bit unsigned integer to an equivalent 8-bit unsigned integer.
static String ToString(uint16_t value, std::nullptr_t)
Definition: convert.h:1212
static constexpr uint64_t ToUInt64(uint8_t value)
Converts the specified 8-bit unsigned integer to an equivalent 64-bit unsigned integer.
Definition: convert.h:810
static uint32_t ToUInt32(const Decimal &value)
Converts the specified decimal number to an equivalent 32-bit unsigned integer.
static constexpr int64_t ToInt64(char_t value)
Converts the specified unicode character to an equivalent 64-bit signed integer.
Definition: convert.h:750
static uint16_t ToUInt16(float value)
Converts the specified float number to an equivalent 16-bit unsigned integer.
static uint32_t ToUInt32(const SharedPtr< Object > &obj, const SharedPtr< IFormatProvider > &provider=nullptr)
Converts the specified boxed value to equivalent unsigned 32-bit integer value.
static double ToDouble(const String &value, std::nullptr_t)
Definition: convert.h:1006
static DateTime ToDateTime(uint32_t value)
Conversion is not supported. Always throws InvalidCastException.
static constexpr uint64_t ToUInt64(uint32_t value)
Converts the specified 32-bit unsigned integer to an equivalent 64-bit unsigned integer.
Definition: convert.h:818
static char_t ToChar(int16_t value)
Converts the specified 16-bit signed integer to an equivalent unicode character.
static int8_t ToSByte(const String &value, int from_base)
Converts the specified string containing the string representation of a number in the specified base ...
static double ToDouble(const String &value, Globalization::NumberStyles styles, std::nullptr_t=nullptr)
static String ToString(int32_t value)
Converts the specified value to its string representation.
static constexpr int ToInt32(char_t value)
Converts the specified unicode character to an equivalent 32-bit signed integer.
Definition: convert.h:586
Provides methods that perform some operations on values of enum type. This is a static type with no i...
Definition: enum.h:158