Search
Search titles only
By:
Search titles only
By:
Log in
Register
Search
Search titles only
By:
Search titles only
By:
Menu
Install the app
Install
Forums
New posts
All threads
Latest threads
New posts
Trending threads
Trending
Search forums
What's new
New posts
New ads
New profile posts
Latest activity
Free Ads
Latest reviews
Search ads
Members
Current visitors
New profile posts
Search profile posts
Contact us
Latest ads
Ad icon
Sell your Land, House on idamata.lk for FREE
sajith.xp.pk
Updated:
Today at 9:03 AM
Handmade Character Soft Toys
anil1961
Updated:
Tuesday at 2:11 PM
Bodim.lk out now !
Manoj Suranga Bandara
Updated:
Sunday at 3:05 AM
Power Lifting Lever Belt
SkullVamp
Updated:
Jun 13, 2026
Ad icon
port.lk Domain for sale
Lankan-Tech
Updated:
Jun 13, 2026
Electronics
Vehicles
Property
Search
Reply to thread
Forums
General
Education
ElaKiri Programmer's Club
Get the App
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Message
<blockquote data-quote="rhn123" data-source="post: 15970190" data-attributes="member: 409743"><p>machan mekai mata string count ekak hadanna one. mata one file textbox ekakata load karan eke character count eka ganna one. string eke length aran eken thiyena spaces adu karala. 1d array eken kara ethakota load karana file eke multi lines gihin thibboth case. single line nam shape count eka enawa.</p><p>enisa 2d array ekak onane multi lines giya text ekaka count eka ganna. </p><p></p><p>mata methana thiyena lokuma prashne text eka kohomada 2D array ekakata convert karaganne naththam 2D array ekaka store karanne kiyala ps help me.</p><p></p><p></p><p>mage danata code eka meka(meke mata asd kiyana array ekata file eke thiyena text eka store karaganna bane)</p><p></p><p> private void button1_Click(object sender, EventArgs e)</p><p> {</p><p> string file = "D://test1.txt";</p><p> System.IO.StreamReader obj = new System.IO.StreamReader(file);</p><p></p><p> char[,] asd = new char[textBox1.Text.Length, textBox1.Text.Length];</p><p> int count = textBox1.Text.Length;</p><p> textBox1.Text = obj.ReadToEnd();</p><p> int rea = 0;</p><p> int spaces = 0;</p><p> for (int i = 0; i <asd.Length; i++)</p><p> {</p><p> for (int j = 0; j < asd.Length; j++)</p><p> {</p><p> if (asd[i,j].Equals(" "))</p><p> {</p><p></p><p> spaces = spaces + 1;</p><p> }</p><p></p><p> }</p><p> }</p><p> rea = count - spaces;</p><p> MessageBox.Show(rea.ToString());</p><p></p><p> } </p><p> }</p></blockquote><p></p>
[QUOTE="rhn123, post: 15970190, member: 409743"] machan mekai mata string count ekak hadanna one. mata one file textbox ekakata load karan eke character count eka ganna one. string eke length aran eken thiyena spaces adu karala. 1d array eken kara ethakota load karana file eke multi lines gihin thibboth case. single line nam shape count eka enawa. enisa 2d array ekak onane multi lines giya text ekaka count eka ganna. mata methana thiyena lokuma prashne text eka kohomada 2D array ekakata convert karaganne naththam 2D array ekaka store karanne kiyala ps help me. mage danata code eka meka(meke mata asd kiyana array ekata file eke thiyena text eka store karaganna bane) private void button1_Click(object sender, EventArgs e) { string file = "D://test1.txt"; System.IO.StreamReader obj = new System.IO.StreamReader(file); char[,] asd = new char[textBox1.Text.Length, textBox1.Text.Length]; int count = textBox1.Text.Length; textBox1.Text = obj.ReadToEnd(); int rea = 0; int spaces = 0; for (int i = 0; i <asd.Length; i++) { for (int j = 0; j < asd.Length; j++) { if (asd[i,j].Equals(" ")) { spaces = spaces + 1; } } } rea = count - spaces; MessageBox.Show(rea.ToString()); } } [/QUOTE]
Insert quotes…
Verification
Asuwa dahayen wadi kalama keeyada?
Post reply
Top
Bottom