Hi,
I have a string value with comma separator,
string currency = "EUR:100;INR:500;CZK:500";
var _currency= currency.split(':');
now i get value in array like
EUR:100
INR:500
CZK:500 in _currency variable.
now how to push this array values to my class
class CurrencyValue
{
public string Currency {get;set;}
public int Amount{get;set;}
}
that is EUR to Currency and 100 to Amount?
Avnish KumarRank #1,003 · 2K reputationPosted Feb 7, 2020, 2:12 AM EST
Rajanikant HawaldarRank #110 · 20.2K reputationPosted Feb 7, 2020, 1:09 AM EST
Ashutosh GuptaRank #805 · 2.9K reputationPosted Feb 8, 2020, 4:14 AM EST
Bhawna TutejaRank #2,418 · 584 reputationPosted Feb 9, 2020, 5:44 PM EST
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts