Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

get access to all controls with a specific tag in C#

private void FindTag(Control.ControlCollection controls)
{
    foreach (Control c in controls)
    {
        if (c.Tag != null)
        //logic

       if (c.HasChildren)
           FindTag(c.Controls); //Recursively check all children controls as well; ie groupboxes or tabpages
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to make a draggable visual studio panel 
Csharp :: how to oppen a site using c# 
Csharp :: how to mock abstract httpcontext using moq .net core 
Csharp :: ASP.NET Core set update clear cache from IMemoryCache (set by Set method of CacheExtensions class) 
Csharp :: c# methods 
Csharp :: c# read only file used by other app 
Csharp :: filter collection viewbag 
Csharp :: add getenumerator to class c# 
Csharp :: why process not found in c# 
Csharp :: ip validation .net core 
Csharp :: unity having virtual start 
Csharp :: Worker service as Windows Service 
Csharp :: orderby make sunday last day c# 
Csharp :: ow-to-return-http-500-from-asp-net-core-rc2-web-api 
Csharp :: constructor in protobuf-net 
Csharp :: how to play a random sound at the position that you want in unity 
Csharp :: c# lernen kostenlos 
Csharp :: Reading a date from xlsx using open xml sdk 
Csharp :: unity remove component 
Csharp :: randon C# 
Csharp :: c# is string nullable 
Csharp :: change object material unity 
Csharp :: c# optional parameters using 
Csharp :: .Net 6 Program.cs 
Csharp :: getawaiter and no extension method 
Csharp :: git change remote origin 
Html :: font awesome icon 6 cdn 
Html :: flutter build web release html renderer 
Html :: html entity quote 
Html :: html video autoplay IPHONE 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =