In this topic, you can find a solution for creating a universal class that provides parsing from string to typical parameter type. However, it may happen that the type specified by this parameter does not provide such a conversion. Is there any way to make this a guarantee?
UPDATE: Thanks for the answer. However, I know that I can generally make restrictions. The problem is whether there is any interface that implements all types that Convert.ChangeType will not work for. Or, which is implemented by all types using the Parse (string) method.
, , , , , . , , (int, char, string ..), , IConvertible . .
Type Constraints, , . , , .
Source: https://habr.com/ru/post/1788824/More articles:Calculation of the maximum size of a signed integer - cWhere is the code that controls the reuse view in Android? - javaCan I request the Android Market license server from application A to find out if application B was purchased legally from the market? - androidHow to work with `rowspan` colors and background in a table? - htmlРедактирование файла 10gb с использованием ограниченной основной памяти в C/С++ - c++Debugging a Python3 project in Netbeans 6.9.1 - python-3.xjquery: узнать, в какой позиции (порядке) определенный элемент находится среди его соседей - javascripthttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1788827/objective-c-sending-arguments-to-a-method-called-by-a-uibutton&usg=ALkJrhgkXfSL-moWN2Ad4a2i-ujtw-Tj9Qhttps://translate.googleusercontent.com/translate_c?depth=1&pto=aue&rurl=translate.google.com&sl=ru&sp=nmt4&tl=en&u=https://fooobar.com/questions/1788828/rails-3-too-many-ways-to-test&usg=ALkJrhhcqQD-nCBMq957kLFKM8WvHRFbMQTree-ish Grid / hierarchical grid in WPF - .netAll Articles