Click here to Skip to main content
15,851,387 members
Home / Discussions / C#
   

C#

 
QuestionRe: Converting string into non-string Form.Object types for passing to methods or updating non-string object.Property with strings Pin
Eddy Vluggen27-Nov-23 8:46
professionalEddy Vluggen27-Nov-23 8:46 
AnswerRe: Converting string into non-string Form.Object types for passing to methods or updating non-string object.Property with strings Pin
Gerry Schmitz27-Nov-23 16:48
mveGerry Schmitz27-Nov-23 16:48 
GeneralRe: Converting string into non-string Form.Object types for passing to methods or updating non-string object.Property with strings Pin
Eddy Vluggen28-Nov-23 1:42
professionalEddy Vluggen28-Nov-23 1:42 
GeneralRe: Converting string into non-string Form.Object types for passing to methods or updating non-string object.Property with strings Pin
Pete O'Hanlon28-Nov-23 1:48
subeditorPete O'Hanlon28-Nov-23 1:48 
GeneralRe: Converting string into non-string Form.Object types for passing to methods or updating non-string object.Property with strings Pin
Eddy Vluggen28-Nov-23 2:02
professionalEddy Vluggen28-Nov-23 2:02 
GeneralRe: Converting string into non-string Form.Object types for passing to methods or updating non-string object.Property with strings Pin
Gerry Schmitz28-Nov-23 7:11
mveGerry Schmitz28-Nov-23 7:11 
AnswerRe: Converting string into non-string Form.Object types for passing to methods or updating non-string object.Property with strings Pin
jschell27-Nov-23 7:14
jschell27-Nov-23 7:14 
GeneralRe: Converting string into non-string Form.Object types for passing to methods or updating non-string object.Property with strings Pin
Codice Fictor27-Nov-23 12:12
Codice Fictor27-Nov-23 12:12 
It’s getting clear now…. Because of my background and my only experience with C# is working with objects, refs and pointers created and generated at run time, I was lost on setting up a reference (linking them) in my code with the instantiation of a pre-existing object dragged onto the Form. Every help link is about creating an object with your definitions and manipulating what you created not syntax/methodology on decoding what you didn’t create.
Thank you………..
And I understand Class and SubClass structure but not how to maneuver around in it in C#.

Now that I can pass my Form Control around in my code I’m not sure the buzz words to comprehend this problem (abbreviated):

private void ManuplateButtons(Control InputButton)
{
InputButton.Text = // Good

Button12.FlatStyle = // Good (pre-instantiated on Form)

InputButton.FlatStyle = // CS1061 'type' does not contain a definition …………

Button FlatStyle is available but Control FlatStyle is not in the list of parameters. So now I need to learn how to dig into the object reference(Control InputButton) to find how FlatStyle is referenced inside of the object reference (Control InputButton).

Is it Control.InputButton.A.B.C nope, so I need to learn how to navigate into the object reference (Control InputButton) and query where FlatStyle is stored or discover what else I can do with an object I didn’t create. I imagine this is not an across the board answer because of the many things you could put/reference in an object.

Timeout; I was composing this when I just read jschell’s post. I believe I have caught up to your post.

In reference to above and #1: I usually depend on the Visual Studio dropdown list and look up the details of the options available until I find the parameter/function that I need or the research of the p/f leads me to an answer. The available button12.X where x = Flatstyle, Flatstyle is in the list but in the case of reference(Control InputButton). Flatstyle is not in the list so I must find it……….. methodology unknown to me ‘yet’.

“…..convert from string to enum” but I need to find the enum def for reference(Control InputButton).Flatstyle before I can convert my string to the relevant enum. I understand the cross correlation between 1 & 2 of jschell’s post.

What are the key search phrases of OOP for the methodology and implementation of how discover what is enumerated in an object that is not shown in the dropdown list, because if “string must match the name of the enum exactly” I need to find the exact spelling or the relevant reference. I know a blind search is going to give me a 1000 hits on how to enumerate a string not how to dig into an unknown enumerated string to find out what is inside, so any tips or pointer links on how to decode an existing object would be useful. Once I learn what is available inside I can learn how to manipulate it…………

Thanks……….
GeneralRe: Converting string into non-string Form.Object types for passing to methods or updating non-string object.Property with strings Pin
Gerry Schmitz27-Nov-23 17:00
mveGerry Schmitz27-Nov-23 17:00 
GeneralRe: Converting string into non-string Form.Object types for passing to methods or updating non-string object.Property with strings Pin
Codice Fictor28-Nov-23 19:28
Codice Fictor28-Nov-23 19:28 
GeneralRe: Converting string into non-string Form.Object types for passing to methods or updating non-string object.Property with strings Pin
jschell29-Nov-23 5:56
jschell29-Nov-23 5:56 
GeneralRe: Converting string into non-string Form.Object types for passing to methods or updating non-string object.Property with strings Pin
Gerry Schmitz29-Nov-23 6:25
mveGerry Schmitz29-Nov-23 6:25 
QuestionQuestion Pin
Mo Fouad25-Nov-23 22:35
Mo Fouad25-Nov-23 22:35 
AnswerRe: Question Pin
Richard MacCutchan25-Nov-23 23:11
mveRichard MacCutchan25-Nov-23 23:11 
AnswerRe: Question Pin
Dave Kreskowiak26-Nov-23 5:42
mveDave Kreskowiak26-Nov-23 5:42 
GeneralRe: Question Pin
Richard Andrew x6426-Nov-23 7:28
professionalRichard Andrew x6426-Nov-23 7:28 
AnswerRe: Question Pin
Gerry Schmitz26-Nov-23 10:36
mveGerry Schmitz26-Nov-23 10:36 
GeneralRe: Question Pin
jschell27-Nov-23 7:17
jschell27-Nov-23 7:17 
QuestionC# error i dont know where i going wrong it say identifer expected in line 281 Pin
j k Nov202324-Nov-23 21:45
j k Nov202324-Nov-23 21:45 
AnswerRe: C# error i dont know where i going wrong it say identifer expected in line 281 Pin
Richard MacCutchan24-Nov-23 22:58
mveRichard MacCutchan24-Nov-23 22:58 
GeneralRe: C# error i dont know where i going wrong it say identifer expected in line 281 Pin
j k Nov202324-Nov-23 23:13
j k Nov202324-Nov-23 23:13 
GeneralRe: C# error i dont know where i going wrong it say identifer expected in line 281 Pin
Richard MacCutchan25-Nov-23 0:22
mveRichard MacCutchan25-Nov-23 0:22 
GeneralRe: C# error i dont know where i going wrong it say identifer expected in line 281 Pin
j k Nov202325-Nov-23 0:29
j k Nov202325-Nov-23 0:29 
GeneralRe: C# error i dont know where i going wrong it say identifer expected in line 281 Pin
Richard MacCutchan25-Nov-23 0:44
mveRichard MacCutchan25-Nov-23 0:44 
GeneralRe: C# error i dont know where i going wrong it say identifer expected in line 281 Pin
j k Nov202325-Nov-23 1:11
j k Nov202325-Nov-23 1:11 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.