Quantcast
Channel: User Liyun Zhang - MSFT - Stack Overflow
Viewing all articles
Browse latest Browse all 444

Answer by Liyun Zhang - MSFT for Confused on C# MAUI - how does #if work?

$
0
0

First of all, you can check the official document about Conditional compilation. The #if <Platform> is preprocessor directive.

The C# compiler compiles the code between the #if directive and #endif directive only if the specified symbol is defined, or not defined when the ! not operator is used.

And the official document about Dependency injection in Maui doesn't mention the platform code. The dependency injection almost uses in the maui share library not platform part.


Viewing all articles
Browse latest Browse all 444

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>