Use C# code in Ionic app

Hi! I’m new in this of Ionic Framework. I want to create an offline app. But I want to implement my own programming language built in c# code to the app. How can I do this? I know ionic apps use TypeScript but i don’t find a way to mix the two languages.

I wait for you answers, thanks :slight_smile:

I don’t think there’s really a way to do this. The closest you could do is write a Cordova plugin using Java. If you’re dead set on C# you may want to look into Xamarin.

Forget it. Kinda removes the point of Ionic / PWA / write once run everywhere.

Xamarin is write once, then write a UI for each platform, compile individually, have ZERO offering for any other platform such as the web browser / desktop, pray.

Actually I was exploring Xamarin, but i like ionic because is more cross-platform, you can’t have a Xamarin app running in the web or in the desktop. Should I write the programming language (is an interpreter) in TypeScript?

so, i can’t do anything?
leave c# and use ionic framework only?

No more than you can use c# in a PHP or Java or NodeJs app.

You can use it for the backend services of course as a series of end points hanging off a WebAPI app.

Ionic uses HTML / CSS / Javascript (typescript). Not sure what to tell you.

So yeah, the programming language MUST be written in TypeScript code until i find another solution

I don’t get what you mean ‘another solution’.

Typecript IS the solution

1 Like

Haha, yeah, you are right.
And also TypeScript is similar to c#, so i won’t have big issues.
Thanks :+1:

Only in a very superficial sense. I think you should not try to look for similarities, but instead approach learning idiomatic Angular from the ground up.


Ever feel in development we’re constantly ‘starting again’ lol.

It’s all too easy to attempt to fight the tide based on our previous knowledge, as soon as you’re swimming in the same direction all of a sudden stuff starts to work.