question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

+= string concatenation failing with struct to class property concat

See original GitHub issue

Hello i saw this issues in bridge.net and try to run it on h5 In fact, the problem also exists in h5. here is the sample : Expected: Animal Farm Actual: Animal

using System;
using H5;
using H5.Core;
using static H5.Core.es5;
using static H5.Core.dom;
using Console = System.Console;

namespace h5
{
    public struct Book
    {
        public string Title;
    }
    public class Delivery
    {
        public Book[] Books;
    }
    class Program
    {
        static void Main(string[] args)
        {

            {
                var delivery = new Delivery();
                delivery.Books = new Book[1];
                delivery.Books[0] = new Book();

                delivery.Books[0].Title = "Animal";
                delivery.Books[0].Title += " Farm";

                // Expected: Animal Farm
                // Actual:   Animal
                Console.Log(delivery.Books[0].Title);
            }
        }
    }
}


Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

1reaction
hardhubcommented, Sep 20, 2021

Yes you can transfer the problems because they seem important. I’m actually trying to understand how h5 or bridge.net does some of its components works because many of them are JavaScript codes and get called by c# so its a mess in the bridge.js I think we should help each other outside github by using whatsapp or telegram until we solve these problems because I don’t think one person (@theolivenbaum )is able to solve all bridge.net problems

As I know gitter is available https://gitter.im/curiosityai/h5

0reactions
Ali1Jamalcommented, Sep 20, 2021

@Ali1Jamal the easiest is to create a blank h5 project with the code you want to test, and run H5.Compiler from within Visual Studio (or whatever IDE you’re using), but targeting your project. As an example (this on VS2022)

image

I have no complaints about test codes . But thanks for mentioning this.

Read more comments on GitHub >

github_iconTop Results From Across the Web

c# - New Reference When Concatenating A String
It will first follow the reference to the "old" a and concat that ... a property of a class (since the whole class...
Read more >
Is it inefficient to concatenate strings one at a time?
In some browsers, string concatenation appears to be optimized automatically, and in other cases it isn't. So the recommendation (at least in ...
Read more >
Compile-time string concatenation | Andrzej's C++ blog
We will start with a bug, taken from real life. It spans across three files: Question: what happens when this program is executed?...
Read more >
Setting <Image /> source with string concatenation fails ...
The above fails with the usual: Requiring unknown module "image!somwething_for_somethingelse". If you are sure the module is there, try ...
Read more >
+ Concatenation operator - Progress Documentation
Joins two character strings or expressions. The data type of the returned value matches the data type of the expressions passed to the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found