public aaa getStrunct(string s) { var a = new aaa(); a.Name = s; return(a); }
public void AAAA() { var b = getStrunct("aaaaaa"); for (int i = 0; i < 10; i++) { aaa c = new aaa(); c = getStrunct(i.ToString()); Console.WriteLine(c); } Console.WriteLine(b); }
public void AddProductTest() { #region ÄãºÃ aaa hh = f => { return(Math.Pow(f, 2)); }; var ff = hh(10); #endregion ÄãºÃ http = new HttpClient(); var fs = new FileStream(@"D:\GitHubProjects\Boss.DDD\Boss.DDD.Test\Img\photo.png", FileMode.Open, FileAccess.Read); var by = new byte[fs.Length]; fs.Read(by, 0, Convert.ToInt32(fs.Length)); fs.Close(); var addProductSPUDto = new AddProductSPUDto() { SPUName = "²âÊÔSPUÃû³Æ", SPUDes = "²âÊÔSPUÏêϸ", SKUSpecs = new List <string>() { "Âö¶¯500ºÁÉý", "Âö¶¯700ºÁÉý" }, SKUUnits = new List <string>() { "Æ¿", "Æ¿" }, SKUDealerPrices = new List <decimal>() { 100, 120 }, SKUImages = new List <byte[]>() { by, by }, SKUPV = new List <decimal>() { 120, 200 } }; var json = JsonConvert.SerializeObject(addProductSPUDto); HttpContent httpContent = new StringContent(json); httpContent.Headers.ContentType = new System.Net.Http.Headers.MediaTypeHeaderValue("application/json"); var result = http.PostAsync("http://localhost:54309/api/Product/AddProduct", httpContent).Result; var val = result.Content.ReadAsStringAsync().Result; }
void Start() { aaa a1 = new aaa(); aaa a2 = new aaa(); if (!a1.Equals(a2)) { Debug.Log("sss"); } HashSet <aaa> hs = new HashSet <aaa>(); //对比器,T必须实现 Equals 和 GetHashCode List <aaa> list = new List <aaa>(); }
public void GetBestLimits() { var price = new FilePrices("intraday.generated.txt"); List <aaa> l = new List <aaa>(); TradingBotSimple tradingBotSimple; for (int b = 0; b < 20; b++) { //int s = 3; for (int s = 0; s < 10; s++) { tradingBotSimple = new TradingBotSimple(InitMoney, BrokerFee); tradingBotSimple.BuyLimitPercent = (decimal)b / 10; tradingBotSimple.SellLimitPercent = (decimal)s / 10; Calculate(price, tradingBotSimple); var a = new aaa { b = b, s = s, total = tradingBotSimple.Total }; l.Add(a); } } foreach (var ff in l.OrderBy(x => x.total)) { Console.WriteLine($"total={ff.total} b={ff.b} s={ff.s}"); } }
private void Button_Click_4(object sender, RoutedEventArgs e) { aaa aa = new aaa(); aa.ShowDialog(); }
public static void x(this aaa myClass) { string str = myclass.a(5); }
public static void x(this aaa myClass) { // use public methods of class you are extending string str = myclass.a(5); }