# C#

**URL:** https://talk.remobjects.com/c/elements/csharp/23.md

[Latest](https://talk.remobjects.com/latest.md) · [Categories](https://talk.remobjects.com/categories.md) · [Tags](https://talk.remobjects.com/tags.md)

---

## [Debugger Int64 precision in Water](https://talk.remobjects.com/t/debugger-int64-precision-in-water/33757)

<div class="topic-metadata">

**Author:** [@joseasl](https://talk.remobjects.com/u/joseasl)\
**Replies:** 2\
**Last updated:** [August 7, 2026, 7:38pm UTC](https://talk.remobjects.com/t/debugger-int64-precision-in-water/33757 "2026-08-07T19:38:05Z")

</div>

target .net core long a = new Random().NextInt64(); Console.WriteLine(a.ToString()); a shows different value in the debugger that the output from toString. Maybe converted as Double internally and cannot store the bigg…

---

## [How to create DLL instead of COM in .Net 8.0](https://talk.remobjects.com/t/how-to-create-dll-instead-of-com-in-net-8-0/31370)

<div class="topic-metadata">

**Author:** [@hkhan](https://talk.remobjects.com/u/hkhan)\
**Replies:** 0\
**Last updated:** [February 7, 2025, 6:28pm UTC](https://talk.remobjects.com/t/how-to-create-dll-instead-of-com-in-net-8-0/31370 "2025-02-07T18:28:09Z")

</div>

We were using RemObjects Hydra using .NetFramework 4.8 and had to upgrade to .Net 8.0 recently. I have following questions: dotNet Framework 4.8 generated dll. Why .Net core generates COM? Can I generate dll using .Ne…

---

## [Error in case when boolean expression](https://talk.remobjects.com/t/error-in-case-when-boolean-expression/31242)

<div class="topic-metadata">

**Author:** [@igorm](https://talk.remobjects.com/u/igorm)\
**Replies:** 7\
**Last updated:** [January 10, 2025, 12:26pm UTC](https://talk.remobjects.com/t/error-in-case-when-boolean-expression/31242 "2025-01-10T12:26:18Z")

</div>

Hello! I try to compile C# code from Visual Studio (it succesfully compiled by MS CSharp compiler), I got error: Semilocon expected. Source code: switch (enumerator.Current) { … … … \* case "--" …

---

## [C# 11 multiline strings](https://talk.remobjects.com/t/c-11-multiline-strings/31132)

<div class="topic-metadata">

**Author:** [@Danilo](https://talk.remobjects.com/u/Danilo)\
**Replies:** 5\
**Last updated:** [December 13, 2024, 3:59pm UTC](https://talk.remobjects.com/t/c-11-multiline-strings/31132 "2024-12-13T15:59:47Z")

</div>

C# 11 supports multiline strings (raw string literals): Unfortunately this doesn‘t work in Elements: string longMessage = """ This is a long message. It has several lines. Some are …

---

## [Possible to create .fx file from C# code?](https://talk.remobjects.com/t/possible-to-create-fx-file-from-c-code/31127)

<div class="topic-metadata">

**Author:** [@Danilo](https://talk.remobjects.com/u/Danilo)\
**Replies:** 8\
**Last updated:** [December 4, 2024, 12:03pm UTC](https://talk.remobjects.com/t/possible-to-create-fx-file-from-c-code/31127 "2024-12-04T12:03:18Z")

</div>

I created an import project for Raylib .dylib on macOS. It auto-generated the .fx file from raylib.h, but the result is very simple. For example, it created: public struct Raylib.Color { public byte r; public …

---

## [Cannot cast char array to pointer](https://talk.remobjects.com/t/cannot-cast-char-array-to-pointer/30902)

<div class="topic-metadata">

**Author:** [@Andreas\_Flucke](https://talk.remobjects.com/u/Andreas_Flucke)\
**Replies:** 4\
**Last updated:** [October 16, 2024, 12:56pm UTC](https://talk.remobjects.com/t/cannot-cast-char-array-to-pointer/30902 "2024-10-16T12:56:19Z")

</div>

Hi, this piece of code doesn’t compile with Hydrogene but with csc: using System.Runtime.InteropServices; namespace Test { \[StructLayout(LayoutKind.Explicit)\] unsafe struct IMAGE\_IMPORT\_BY\_NAME { \[FieldOffset(0)\] …

---

## [Explicit interface property implementation](https://talk.remobjects.com/t/explicit-interface-property-implementation/28941)

<div class="topic-metadata">

**Author:** [@MKlasek-TescoSW](https://talk.remobjects.com/u/MKlasek-TescoSW)\
**Replies:** 2\
**Last updated:** [October 7, 2023, 1:04am UTC](https://talk.remobjects.com/t/explicit-interface-property-implementation/28941 "2023-10-07T01:04:38Z")

</div>

Hi, I’ve discovered some possibly strange behavior when a class tries to explicitly implement a property for an interface that inherited that property from another interface and I’m attaching a simple example project. I…

---

## [Can I disable the pop-up code view in the editor?](https://talk.remobjects.com/t/can-i-disable-the-pop-up-code-view-in-the-editor/28670)

<div class="topic-metadata">

**Author:** [@brian71us](https://talk.remobjects.com/u/brian71us)\
**Replies:** 2\
**Last updated:** [August 18, 2023, 12:18pm UTC](https://talk.remobjects.com/t/can-i-disable-the-pop-up-code-view-in-the-editor/28670 "2023-08-18T12:18:15Z")

</div>

Whenever I move over a comment or compiler directive (like the one shown below) a pop up appears instantly. It would be alright if it popped up after a few seconds but right now it’s coming up way to quick. Can I change …

---

## [Creating extension methods for IntPtr?](https://talk.remobjects.com/t/creating-extension-methods-for-intptr/28660)

<div class="topic-metadata">

**Author:** [@brian71us](https://talk.remobjects.com/u/brian71us)\
**Replies:** 1\
**Last updated:** [July 27, 2023, 11:12am UTC](https://talk.remobjects.com/t/creating-extension-methods-for-intptr/28660 "2023-07-27T11:12:56Z")

</div>

I am trying to port third party code and there are references to IntPtr.Zero and IntPtr.Size which trigger an error No static method “Zero” on “IntPtr” or No static method “Size” on “IntPrt” respectively. Looking online…

---

## [Can I use the C# Elements compiler to build a dylib?](https://talk.remobjects.com/t/can-i-use-the-c-elements-compiler-to-build-a-dylib/27278)

<div class="topic-metadata">

**Author:** [@garry.pettet](https://talk.remobjects.com/u/garry.pettet)\
**Replies:** 3\
**Last updated:** [September 27, 2022, 11:01am UTC](https://talk.remobjects.com/t/can-i-use-the-c-elements-compiler-to-build-a-dylib/27278 "2022-09-27T11:01:03Z")

</div>

Is it possible to build a native dylib using C#? I’m asking because I have written a scripting language in an obscure language (Xojo) but it’s a bit slow. I am thinking of porting it to C# using Elements. If I could bui…

---

## [Markup Xaml Parse Exception](https://talk.remobjects.com/t/markup-xaml-parse-exception/27214)

<div class="topic-metadata">

**Author:** [@muhammad.shahbaz](https://talk.remobjects.com/u/muhammad.shahbaz)\
**Replies:** 21\
**Last updated:** [September 20, 2022, 12:13pm UTC](https://talk.remobjects.com/t/markup-xaml-parse-exception/27214 "2022-09-20T12:13:37Z")

</div>

My WPF project throws xamal parse exception when it is run. this exception is thrown from main window when InitializeComponent method is called .How can I figure it out ? here is the stack trace of this exception Syste…

---

## [How do I convert WPF application to MacOS](https://talk.remobjects.com/t/how-do-i-convert-wpf-application-to-macos/27145)

<div class="topic-metadata">

**Author:** [@muhammad.shahbaz](https://talk.remobjects.com/u/muhammad.shahbaz)\
**Replies:** 6\
**Last updated:** [September 7, 2022, 2:11pm UTC](https://talk.remobjects.com/t/how-do-i-convert-wpf-application-to-macos/27145 "2022-09-07T14:11:28Z")

</div>

Hi, We have a desktop application for windows OS build in WPF, we were searching around to convert it for MacOS and found RemObject Element. We’ve explored it a little bit and curious about either it can do this job o…

---

## [SQLite.interop Nuget package installation failure](https://talk.remobjects.com/t/sqlite-interop-nuget-package-installation-failure/27187)

<div class="topic-metadata">

**Author:** [@muhammad.shahbaz](https://talk.remobjects.com/u/muhammad.shahbaz)\
**Replies:** 20\
**Last updated:** [September 7, 2022, 1:46pm UTC](https://talk.remobjects.com/t/sqlite-interop-nuget-package-installation-failure/27187 "2022-09-07T13:46:07Z")

</div>

I’m facing an issue while install SQLite.intreop library. I have installed system.Data.SQLite package from Nuget package manager console but SQLite.intreop dll is missing in this package . when tried to install stand-a…

---

## [Unknown type error in RemObject C#](https://talk.remobjects.com/t/unknown-type-error-in-remobject-c/27153)

<div class="topic-metadata">

**Author:** [@muhammad.shahbaz](https://talk.remobjects.com/u/muhammad.shahbaz)\
**Replies:** 3\
**Last updated:** [August 30, 2022, 1:13pm UTC](https://talk.remobjects.com/t/unknown-type-error-in-remobject-c/27153 "2022-08-30T13:13:48Z")

</div>

Hi, we deserialized an object and cast it into dynamic type .when tried to get specific (“item.project\_id”) property from this object using RemObject c# it gives Error ("Unknown type object ") here is the code var da…

---

## [RemObjects c# sample projects do not Run](https://talk.remobjects.com/t/remobjects-c-sample-projects-do-not-run/27125)

<div class="topic-metadata">

**Author:** [@muhammad.shahbaz](https://talk.remobjects.com/u/muhammad.shahbaz)\
**Replies:** 5\
**Last updated:** [August 23, 2022, 12:28pm UTC](https://talk.remobjects.com/t/remobjects-c-sample-projects-do-not-run/27125 "2022-08-23T12:28:13Z")

</div>

Hi Everybody , I want to convert my window WFP application to mac application. For this, I have download RemObjects for C# sample project and tried to run using visual studio 2019 .but it gave following error “Element…

---

## [Well, that was satisfying ... "Hello World!" with .Net 6](https://talk.remobjects.com/t/well-that-was-satisfying-hello-world-with-net-6/25762)

<div class="topic-metadata">

**Author:** [@chikega](https://talk.remobjects.com/u/chikega)\
**Replies:** 13\
**Last updated:** [March 18, 2022, 3:16am UTC](https://talk.remobjects.com/t/well-that-was-satisfying-hello-world-with-net-6/25762 "2022-03-18T03:16:04Z")

</div>

… slashing all the boiler template code :nerd\_face: //using System; //using System.Collections.Generic; //using System.Linq; //using System.Text; //namespace Cons\_CS\_NetCore //{ //static class Program //{ …

---

## [Serilog fails to compile](https://talk.remobjects.com/t/serilog-fails-to-compile/24841)

<div class="topic-metadata">

**Author:** [@tkautz](https://talk.remobjects.com/u/tkautz)\
**Replies:** 2\
**Last updated:** [May 28, 2021, 1:55pm UTC](https://talk.remobjects.com/t/serilog-fails-to-compile/24841 "2021-05-28T13:55:11Z")

</div>

Hi there, i tried to convert Serilog (GitHub - serilog/serilog: Simple .NET logging with fully-structured events · GitHub) to compile with Elements and i(t) failed with 282 errors. For some reason, there seems to be a …

---

## [Help needed: Element not allowed before the inherited constructor has been called](https://talk.remobjects.com/t/help-needed-element-not-allowed-before-the-inherited-constructor-has-been-called/24795)

<div class="topic-metadata">

**Author:** [@tkautz](https://talk.remobjects.com/u/tkautz)\
**Replies:** 5\
**Last updated:** [May 20, 2021, 12:32pm UTC](https://talk.remobjects.com/t/help-needed-element-not-allowed-before-the-inherited-constructor-has-been-called/24795 "2021-05-20T12:32:32Z")

</div>

Hi there, as i am not a C#-guy, i am not sure if this is an issue with RO C# or C# in general. Any hints how to solve this issue are welcome. A third party library compiles fine with MS C#, but including it in an Oxyge…

---

## [Case Statement Issue - 'hidden' CRLF in input stream?](https://talk.remobjects.com/t/case-statement-issue-hidden-crlf-in-input-stream/24393)

<div class="topic-metadata">

**Author:** [@chikega](https://talk.remobjects.com/u/chikega)\
**Replies:** 13\
**Last updated:** [April 9, 2021, 9:36am UTC](https://talk.remobjects.com/t/case-statement-issue-hidden-crlf-in-input-stream/24393 "2021-04-09T09:36:44Z")

</div>

Has anyone encountered this particular issue in Water/Fire with the Case Statement in Hydrogen(C#). It appears there may be some hidden character in the standard input stream that is tripping the Default statement to be …

---

## [String interpolation tokens](https://talk.remobjects.com/t/string-interpolation-tokens/23220)

<div class="topic-metadata">

**Author:** [@Thom\_Halvorsen](https://talk.remobjects.com/u/Thom_Halvorsen)\
**Replies:** 2\
**Last updated:** [October 1, 2020, 6:24pm UTC](https://talk.remobjects.com/t/string-interpolation-tokens/23220 "2020-10-01T18:24:43Z")

</div>

Hi, In VS I can use the “$” and “@” tokens together in any order. The compiler complains when I try this in Water. Any chance of opening up for this? // Thom

---

## [Export of the WebAssembly memory buffer](https://talk.remobjects.com/t/export-of-the-webassembly-memory-buffer/22861)

<div class="topic-metadata">

**Author:** [@christopal27](https://talk.remobjects.com/u/christopal27)\
**Replies:** 2\
**Last updated:** [August 19, 2020, 3:18pm UTC](https://talk.remobjects.com/t/export-of-the-webassembly-memory-buffer/22861 "2020-08-19T15:18:23Z")

</div>

I am trying to compile a C# project to WebAssembly, and I am finding that the actual WebAssembly memory buffer is not accessible from JavaScript. I can access the initial WebAssembly memory buffer that is provided durin…

---

## [Type "String" has no accessible constructors](https://talk.remobjects.com/t/type-string-has-no-accessible-constructors/22505)

<div class="topic-metadata">

**Author:** [@garry.pettet](https://talk.remobjects.com/u/garry.pettet)\
**Replies:** 21\
**Last updated:** [June 12, 2021, 2:07pm UTC](https://talk.remobjects.com/t/type-string-has-no-accessible-constructors/22505 "2021-06-12T14:07:43Z")

</div>

I have this simple macOS Island console app (C#): static class Program { public static int indentLevel = 0; public static Int32 Main(string\[\] args) { Console.WriteLin…

---

## [Nasty Bug in Console.WriteLine()](https://talk.remobjects.com/t/nasty-bug-in-console-writeline/22504)

<div class="topic-metadata">

**Author:** [@garry.pettet](https://talk.remobjects.com/u/garry.pettet)\
**Replies:** 9\
**Last updated:** [July 8, 2020, 9:00am UTC](https://talk.remobjects.com/t/nasty-bug-in-console-writeline/22504 "2020-07-08T09:00:23Z")

</div>

Create a new macOS Island Console Application using RTL and C#. Put this code into program.cs: namespace TestApp { static class Program { public static Int32 Main(string\[\] args) { Co…

---

## [C# \`is\` operator issue](https://talk.remobjects.com/t/c-is-operator-issue/22466)

<div class="topic-metadata">

**Author:** [@garry.pettet](https://talk.remobjects.com/u/garry.pettet)\
**Replies:** 13\
**Last updated:** [July 8, 2020, 1:06pm UTC](https://talk.remobjects.com/t/c-is-operator-issue/22466 "2020-07-08T13:06:39Z")

</div>

I am seeing a difference between Elements C# and Microsoft’s C# around the is operator. This program: namespace Test { class Person { } static class Program { public static Int…

---

## [C# Interpolated String Bug?](https://talk.remobjects.com/t/c-interpolated-string-bug/22465)

<div class="topic-metadata">

**Author:** [@garry.pettet](https://talk.remobjects.com/u/garry.pettet)\
**Replies:** 8\
**Last updated:** [June 12, 2021, 2:07pm UTC](https://talk.remobjects.com/t/c-interpolated-string-bug/22465 "2021-06-12T14:07:22Z")

</div>

Is it a design choice or an oversight that C# is string interpolation is different between the Elements compiler and the Microsoft compiler? Take this little console app test program: namespace Test { static class …

---

## [Find some minimal COM creating examples](https://talk.remobjects.com/t/find-some-minimal-com-creating-examples/22428)

<div class="topic-metadata">

**Author:** [@865147540](https://talk.remobjects.com/u/865147540)\
**Replies:** 31\
**Last updated:** [July 1, 2020, 7:17am UTC](https://talk.remobjects.com/t/find-some-minimal-com-creating-examples/22428 "2020-07-01T07:17:20Z")

</div>

Hi friends, recently i learn some basic to create COM in c language, it is fun. then i tried to use the knowledge to do the same thing in Island platform, but i don’t get clear clues how to get started, because the lang…

---

## [Am I misunderstanding this method?](https://talk.remobjects.com/t/am-i-misunderstanding-this-method/22282)

<div class="topic-metadata">

**Author:** [@garry.pettet](https://talk.remobjects.com/u/garry.pettet)\
**Replies:** 5\
**Last updated:** [June 10, 2020, 8:32pm UTC](https://talk.remobjects.com/t/am-i-misunderstanding-this-method/22282 "2020-06-10T20:32:31Z")

</div>

I have this C# code snippet: ulong codePoint = Convert.TryHexStringToUInt64(hexString); if (codePoint == null) { // Invalid code point. Error("Invalid Unicode codepoint \`" + hexString + "\`."); } else { lex += code…

---

## [How do you convert a single Unicode code point to a string?](https://talk.remobjects.com/t/how-do-you-convert-a-single-unicode-code-point-to-a-string/22259)

<div class="topic-metadata">

**Author:** [@garry.pettet](https://talk.remobjects.com/u/garry.pettet)\
**Replies:** 2\
**Last updated:** [June 9, 2020, 1:40pm UTC](https://talk.remobjects.com/t/how-do-you-convert-a-single-unicode-code-point-to-a-string/22259 "2020-06-09T13:40:07Z")

</div>

Let’s say I have the following code point: u1F64A (which is the :speak\_no\_evil: emoji). This can be written as: string monkey = \\u1F64A; How would I convert a known codepoint (as an integer) to a string at runtime tho…

---

## [RTL DateTime.ToString() bug?](https://talk.remobjects.com/t/rtl-datetime-tostring-bug/22226)

<div class="topic-metadata">

**Author:** [@garry.pettet](https://talk.remobjects.com/u/garry.pettet)\
**Replies:** 3\
**Last updated:** [June 6, 2020, 7:14pm UTC](https://talk.remobjects.com/t/rtl-datetime-tostring-bug/22226 "2020-06-06T19:14:03Z")

</div>

I’m sure I’m doing something wrong here but I have this C# code (using Elements RTL on Island macOS console app): namespace TestApp { static class Program { public static Int32 Main(string\[\] args) …

---

## [C# Memory\<T\>](https://talk.remobjects.com/t/c-memory-t/22203)

<div class="topic-metadata">

**Author:** [@garry.pettet](https://talk.remobjects.com/u/garry.pettet)\
**Replies:** 3\
**Last updated:** [June 5, 2020, 6:33pm UTC](https://talk.remobjects.com/t/c-memory-t/22203 "2020-06-05T18:33:17Z")

</div>

I need to store (as a field on a class) a contiguous block of memory. In Xojo, I used a class called a MemoryBlock. It looks like C# provides the Span\<T\> and Memory\<T\> structs which do what I need. The Span\<T\> struct can…

[Next page](https://talk.remobjects.com/c/elements/csharp/23.md?page=1)
