korasoglu Posted November 26, 2016 Share Posted November 26, 2016 Arkadaşlar oluşturduğum stringbuilderi nasıl boşaltabilirim ben şöyle bir mantık yürüttüm lakin daha kolay bir yöntemi olması lazım. for (int i = 0; i < builder.Length; i++) { builder.Remove(0, builder.Length); } yani ben clear yapmak istiyorum. Quote Link to comment Share on other sites More sharing options...
Extended Posted November 26, 2016 Share Posted November 26, 2016 (edited) builder.setLength(0); builder.delete(0, builder.length()); Edited November 26, 2016 by Extended Quote Link to comment Share on other sites More sharing options...
korasoglu Posted November 27, 2016 Author Share Posted November 27, 2016 Sevgili Extended builder.setLength(0); yok builder.delete(0, builder.length()); Yok Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted November 27, 2016 Editor Share Posted November 27, 2016 builder.Clear(); yeterli tek başına Quote Link to comment Share on other sites More sharing options...
korasoglu Posted December 6, 2016 Author Share Posted December 6, 2016 Şimdi tekrar denedim StringBuilder sb = new StringBuilder(); sb. (clear yok) Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted December 10, 2016 Editor Share Posted December 10, 2016 Olmamasının imkanı yok. Quote Link to comment Share on other sites More sharing options...
MostWanted Posted December 10, 2016 Share Posted December 10, 2016 Kullandığınız .Net framework sürümü ve kullandığınız namespace'leri (kodun ilk satırlarında using ile başlayan kısımlar) buraya yazabilir misiniz? Quote Link to comment Share on other sites More sharing options...
korasoglu Posted December 14, 2016 Author Share Posted December 14, 2016 (edited) Net 2 kullandım using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Text; using System.Diagnostics; using System.IO; using System.Collections; using System.Windows.Forms; Please register to see this content. Edited December 14, 2016 by korasoglu Quote Link to comment Share on other sites More sharing options...
MostWanted Posted December 14, 2016 Share Posted December 14, 2016 .Net 2'de StringBuilder sınıfının clear metodu yok ne yazık ki. Onun için en az .Net 4 kullanmanız lazım. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.