Jump to content
View in the app

A better way to browse. Learn more.

Tuts 4 You

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Needing a Very Small Help in C# PLEASE !!

Featured Replies

Posted

I have One textBox and a Button1

Code of btnStart

	if (this.txtBox.Text.Length == 0)
	{
		Interaction.MsgBox("Please Insert Your Data", MsgBoxStyle.OkOnly, null);
		return;
	}
	
	this.thflag = false;
	this.th2flag = false;
	this.btnstart.Enabled = false;
	this.btnstop.Enabled = true;
	this.th = new Thread(new ThreadStart(this.BlackHat));
	this.th.IsBackground = true;
	this.th.Start();
	this.Timer1.Enabled = true;

This is my code of this.BlackHat 
 

checked
	{
		using (WebClient webClient = new WebClient())
		{
			foreach (string text in this.txtBox.Lines)
			{
				if (!string.IsNullOrEmpty(text))
				{
					string address = "https://XXXXXXX/" + text + "XXXXXXXXXXX";
					for (;;)

 

So What is My Problem ?

When I paste my Data into textBox like this

text1
text2
text3
text4......
text100

So My code sent request One by One means First it get "text1" then once this query executed it move to "text2" and then to "text3" 

I want it to make like this that When I press Button "Start" It reads 50 Text at once.

means + text + this Code in the URL give input like text1,text2,text3.......text50 in one request and after this text51,text52,text43.....text100 in 2nd Query.

For Example,
I put 
text1
text2
text3...
text100 in the textbox So now my URL is like this --

"https://XXXXXXX/" + text1 + "XXXXXXXXXXX"; after this
"https://XXXXXXX/" + text2 + "XXXXXXXXXXX"; and after this
"https://XXXXXXX/" + text3 + "XXXXXXXXXXX"; and so on ... 

I want it that It reads Data ;like this 

"https://XXXXXXX/" + text1,text2,text3,text4......text50 + "XXXXXXXXXXX";

"https://XXXXXXX/" + text51,text52,text53,text54......text100 + "XXXXXXXXXXX"; and so on

So Please guide me What Changes I need to do or How I can do this. 

Edited by BlackHat

https://docs.microsoft.com/en-us/dotnet/api/system.string.concat

Get the next 50 elements and concat them, then repeat.

 

If you want to add a delimiter for every text use Join instead.

https://docs.microsoft.com/en-us/dotnet/api/system.string.join?view=netcore-3.1#System_String_Join_System_String_System_String___

 

You should consider taking a programming course.

 

  • 4 months later...
  • Author

Resolved It using string builder !!! Afterall

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.