C
C#•2y 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•2y 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•2y 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•2y 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•2y ago
i mean i specificly want a list of fuctions like this like where i can click and then see its code
Angius
Angius•2y ago
C# is not a visual programming language, so you will not get a list of functions Try as you might
Dawnbomb
DawnbombOP•2y ago
fuck
Angius
Angius•2y 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•2y ago
im not asking to drag blocks of code around by mouse
mtreit
mtreit•2y ago
Object browser can show you all methods organized by type
No description
Dawnbomb
DawnbombOP•2y ago
i literally just like, want a list that...looks closer! although idk how to use it
Angius
Angius•2y 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•2y ago
Only public ones though
Angius
Angius•2y ago
Well, yeah
mtreit
mtreit•2y ago
Or 'accessible' rather
Angius
Angius•2y ago
You shouldn't concern yourself with the inaccessible ones, they're like that for a reason
Dawnbomb
DawnbombOP•2y 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•2y 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•2y 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•2y ago
It'll work i suppose. Thanks šŸ™‚
Accord
Accord•2y 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.

Did you find this page helpful?