I have a static method Where i return a variable .
- public static Array LoadAssetAssignView()
- {
- //do something
- return arr;
- }
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend5days leftRegister
Chetan RanpariyaRank #1,852 · 801 reputationPosted Jan 3, 2017, 11:28 PM EST
MayankRank #4,018 · 371 reputationPosted Jan 4, 2017, 11:46 PM EST
This code will help you in resolve your issue.
public static DataClass LoadView()
{
DataClass obj = new DataClass();
obj.Property1= new int[5]{ 26, 27, 28, 29, 30 };
obj.Property2=new int[3]{1,2,3};
return obj;
}
public class DataClass
{
public int[] Property1 { get; set; }
public int[] Property2 { get; set; }
}
Please mark as answer if it resolve your issue.
Suthahar JegatheesanRank #162 · 14.5K reputationPosted Jan 3, 2017, 11:38 PM EST
Tapan PatelRank #614 · 3.9K reputationPosted Jan 4, 2017, 3:52 AM EST
Suthahar JegatheesanRank #162 · 14.5K reputationPosted Jan 4, 2017, 3:54 AM EST
Dinesh SanthalingamRank #2,085 · 690 reputationPosted Jan 3, 2017, 11:49 PM EST
Suthahar J