[GH-ISSUE #1207] [Construct build exceptions] used some json parsing of dynamic types in my code and it didn't work properly #886

Open
opened 2026-02-27 15:52:15 +03:00 by kerem · 1 comment
Owner

Originally created by @AlphaCharry on GitHub (Aug 2, 2023).
Original GitHub issue: https://github.com/quasar/Quasar/issues/1207

Problem description

                dynamic[] configTable = JsonConvert.DeserializeObject<dynamic[]>(configTableJson);
                int count = configTable.Length;

                foreach (dynamic RowItem in configTable)
                {
                    bool isExist = ConfigHelper.checkBhinDataTable(RowItem.bh.Value);  .// erro <----happend
                    string ExecSQL = "";
                    if (isExist)
                    {
                        ExecSQL = ConfigHelper.getUpdateSQLBuilder(RowItem);
                    }
                    else
                    {
                        ExecSQL = ConfigHelper.getInsertSQLBuilder(RowItem);
                    }
              }

Hello man, I added a code like this in the client and he doesn't work properly, catch to error is checkBhinDataTable is not defined!
But I run this statement alone and he works fine

bool isExist = ConfigHelper.checkBhinDataTable(RowItem.bh.Value);
rerutn isExist 

Proposal

Is there a problem with the compilation?

Additional context

No response

Originally created by @AlphaCharry on GitHub (Aug 2, 2023). Original GitHub issue: https://github.com/quasar/Quasar/issues/1207 ### Problem description ``` dynamic[] configTable = JsonConvert.DeserializeObject<dynamic[]>(configTableJson); int count = configTable.Length; foreach (dynamic RowItem in configTable) { bool isExist = ConfigHelper.checkBhinDataTable(RowItem.bh.Value); .// erro <----happend string ExecSQL = ""; if (isExist) { ExecSQL = ConfigHelper.getUpdateSQLBuilder(RowItem); } else { ExecSQL = ConfigHelper.getInsertSQLBuilder(RowItem); } } ``` Hello man, I added a code like this in the client and he doesn't work properly, catch to error is checkBhinDataTable is not defined! But I run this statement alone and he works fine ``` bool isExist = ConfigHelper.checkBhinDataTable(RowItem.bh.Value); rerutn isExist ``` ### Proposal Is there a problem with the compilation? ### Additional context _No response_
Author
Owner

@AlphaCharry commented on GitHub (Aug 2, 2023):

foreach ? Whether it is related to dynamic typing ?checkBhinDataTable getUpdateSQLBuilder getInsertSQLBuilder will say not found not define!

<!-- gh-comment-id:1661455536 --> @AlphaCharry commented on GitHub (Aug 2, 2023): foreach ? Whether it is related to dynamic typing ?checkBhinDataTable getUpdateSQLBuilder getInsertSQLBuilder will say not found not define!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/Quasar#886
No description provided.