C
C#ā€¢13mo ago
Dawnbomb

ā” Organized Function / method libraries?

In C# i want to try making some reusable methods/functions. In Unreal Engine, there is a "Function Library" that is a list of functions/methods, and when you click one, it takes you to their code, making it very easy to organize and look at / across lots of different ones. Is there anything similar, or any similar setups i can do, for visual studio / C#?
No description
20 Replies
Angius
Angiusā€¢13mo ago
Create a new class library project And reference it in your main project Or handle it separately, and get it via nuget as a package
Dawnbomb
DawnbombOPā€¢13mo ago
is there a way within a project, or is that the way? IE i don't get an organized looking list unless its a project of type library
Angius
Angiusā€¢13mo ago
Well, uh, you can make a static class that will contain all the helper functions, I guess? I believe that's what Unreal's "function library" does, more or less
Dawnbomb
DawnbombOPā€¢13mo ago
i mean i specificly want a list of fuctions like this like where i can click and then see its code
Angius
Angiusā€¢13mo ago
C# is not a visual programming language, so you will not get a list of functions Try as you might
Dawnbomb
DawnbombOPā€¢13mo ago
fuck
Angius
Angiusā€¢13mo ago
You can ctrl-click any piece of code and go to its declaration And you can utilize IntelliSense so that it can show you all methods available in a static class But you're not gonna be dragging blocks of code around with your mouse, I'm afraid
Dawnbomb
DawnbombOPā€¢13mo ago
im not asking to drag blocks of code around by mouse
mtreit
mtreitā€¢13mo ago
Object browser can show you all methods organized by type
No description
Dawnbomb
DawnbombOPā€¢13mo ago
i literally just like, want a list that...looks closer! although idk how to use it
Angius
Angiusā€¢13mo ago
Typing SomeStaticClass. will show you all the available members of that class Same goes for object instances, typing theObject. will show you all members of it
mtreit
mtreitā€¢13mo ago
Only public ones though
Angius
Angiusā€¢13mo ago
Well, yeah
mtreit
mtreitā€¢13mo ago
Or 'accessible' rather
Angius
Angiusā€¢13mo ago
You shouldn't concern yourself with the inaccessible ones, they're like that for a reason
Dawnbomb
DawnbombOPā€¢13mo ago
what i...guess, i want, i some thing where, i guess for organizational simplificy, i have a ton of classes, or maybe rather files that are all part of one partial class, and each one has a method, and i can see all those methods on a list somewhere, like that object browser thing.
mtreit
mtreitā€¢13mo ago
Speak for yourself, I need to know how to use reflection to bypass the author's intent and muck with internals BlobPain
Angius
Angiusā€¢13mo ago
Especially if we're comparing it to Unreal's function library, which is basically a static class with a bunch of static helper functions Then use the object browser
Dawnbomb
DawnbombOPā€¢13mo ago
It'll work i suppose. Thanks šŸ™‚
Accord
Accordā€¢13mo ago
Was this issue resolved? If so, run /close - otherwise I will mark this as stale and this post will be archived until there is new activity.
Want results from more Discord servers?
Add your server