D
D
Denis2021-03-23 14:53:30
C++ / C#
Denis, 2021-03-23 14:53:30

How to find out the names of the component?

There is a line var obj = (Control)sender;to find out which component is currently in obj for example Label or TextBox . You can use it, obj.Name;but then it writes
"System.Windows.Forms.TextBox Text:" how to pull out the TextBox from this .... I hope you don't need to perform any operations with strings.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Vasily Bannikov, 2021-03-23
Folyush @AAGR

You can take GetType - then you will get the type of the object.
From a type, you can extract its full or incomplete name.
https://docs.microsoft.com/ru-ru/dotnet/api/system...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question