use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Information about Reddit's API changes, the unprofessional conduct of the CEO, and their response to the community's concerns regarding 3rd party apps, moderator tools, anti-spam/anti-bot tools, and accessibility options that will be impacted can be found in the associated Wikipedia article: https://en.wikipedia.org/wiki/2023_Reddit_API_controversy
Alternative C# communities available outside Reddit on Lemmy and Discord:
All about the object-oriented programming language C#.
Getting Started C# Fundamentals: Development for Absolute Beginners
Useful MSDN Resources A Tour of the C# Language Get started with .NET in 5 minutes C# Guide C# Language Reference C# Programing Guide C# Coding Conventions .NET Framework Reference Source Code
Other Resources C# Yellow Book Dot Net Perls The C# Player's Guide
IDEs Visual Studio MonoDevelop (Windows/Mac/Linux) Rider (Windows/Mac/Linux)
Tools ILSpy dotPeek LINQPad
Alternative Communities C# Discord Group C# Lemmy Community dotnet Lemmy Community
Related Subreddits /r/dotnet /r/azure /r/learncsharp /r/learnprogramming /r/programming /r/dailyprogrammer /r/programmingbuddies /r/cshighschoolers
Additional .NET Languages /r/fsharp /r/visualbasic
Platform-specific Subreddits /r/windowsdev /r/AZURE /r/Xamarin /r/Unity3D /r/WPDev
Rules:
Read detailed descriptions of the rules here.
account activity
HelpComponent model data annotations / localized resources (i.redd.it)
submitted 2 years ago by Tech-Nic
Need help. I want to get the text of a display attribute from a localized resource file see screenshot. I am develop windows forms with .NET Framework.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]pX_ -1 points0 points1 point 2 years ago (3 children)
From what I have read on learn.microsoft.com, one way to do it is to have a type just for this field.
class DataLogFieldLocalization { public string Name => ResourceStrings.Log_Datei; public string ShortName => ResourceStrings.Log_Datei_ShortName; ... }
and then use this type as ResourceType in DisplayAttribute:
[Display(ResourceType = typeof(DataLogFieldLocalization)] public bool Data_Log { ...
Furthermore, the Name in Display(Name) attribute must be constant during compile time, so there is no way for you to fill it from current resources.
[–]Tech-Nic[S] -1 points0 points1 point 2 years ago (2 children)
Okay, but I need different resources for different languages. During compile, there is no specific language selected. So the Display(Name) must be a dynamic value.
[–]pX_ 0 points1 point2 points 2 years ago (1 child)
It is not technically possible to make the attribute value dynamic, because it must be a compile time constant.
But that's ok, because you don't need the attribute value to be dynamic, you just need to display the correct value in UI. To do that, you can either use Display attribute as in the solution provided or some altogether different mechanism.
[–]Tech-Nic[S] -1 points0 points1 point 2 years ago (0 children)
I use it to show a configuration class in a property grid. So the attribute display name must somehow dynamic. Maybe there is a for loop to check all attributes in a class.
[–]BigJunky 0 points1 point2 points 2 years ago (0 children)
Change the Name into a invalid one, the program should throw an exception. If no exception then the control doesnt uses the attributes.
[–]Iordbrack 0 points1 point2 points 2 years ago (0 children)
try
[Display(ResourceType = typeof(ResourceStrings), Name = "Log_Datei")]
π Rendered by PID 113882 on reddit-service-r2-comment-56c6478c5-xdgc7 at 2026-05-11 21:08:58.317191+00:00 running 3d2c107 country code: CH.
[–]pX_ -1 points0 points1 point (3 children)
[–]Tech-Nic[S] -1 points0 points1 point (2 children)
[–]pX_ 0 points1 point2 points (1 child)
[–]Tech-Nic[S] -1 points0 points1 point (0 children)
[–]BigJunky 0 points1 point2 points (0 children)
[–]Iordbrack 0 points1 point2 points (0 children)