say | huohuo fanatics
say | huohuo fanatics
CC#
Created by say | huohuo fanatics on 10/17/2024 in #help
fastest way to check if list doesn't contain null ?
I have a list of reference type (for example, list of string) as constructor parameter. Now i require that all of the list element must not be null. Everytime the object instance is created, the constructor will loop through the list to verify that none of the element is null. However, this have performance impact to immutable class where any modification require creating new instance of the class (because immutable class can't be modified). Is there faster way to check that list element cannot be null?
25 replies
CC#
Created by say | huohuo fanatics on 10/6/2024 in #help
How to target .net standard in visual studio
when i create new project, the target framework that i can choose is only .net framework, there is no .net standard. I installed .net core 3 in my pc and .net standard still not shown, then i installed .net core 3.1 runtime in visual studio and .net standard still not shown in target framework. How do i target .net standard ??
5 replies
CC#
Created by say | huohuo fanatics on 9/19/2024 in #help
Whats the difference between Workspace and AdhocWorkspace?
Im currently trying to learn roslyn api. In Microsoft.CodeAnalysis namespace, there is two classes named AdhocWorkspace and Workspace. Whats the difference between these two? Which one i should use?
17 replies
CC#
Created by say | huohuo fanatics on 7/24/2024 in #help
where can i learn roslyn compiler api in easier manner?
I want to learn how to use the api provided by roslyn compiler, but i cant find any good tutorial about it. There is the roslyn api tutorial at learn.microsoft.com but it only scratch the surface and didnt go beyond just a small example of code. I tried reading roslyn api documentation (also at learn.microsoft.com), but it contain so many jargon that i dont understand yet. I tried reading the source code at github but gave up because it uses visual basic language which i dont understand. Does anyone know easier way to learn roslyn api without reading the documentation one by one and try to figure out how it works? Is there a standard specification for roslyn compiler api? I tried reading C# standard specification by ECMA and it really helped me to learn C# in depth easier than randomly browsing on internet, so im thinking whether there is standard specification for roslyn compiler api
17 replies