Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

In a C# class project, what is AssemblyCulture used for?

Tags:

c#

properties

Within a C# class project, there's the Properties file called AssemblyInfo.cs. Within this file are a series of assembly attributes including AssemblyTitle, AssemblyDescription, and so on, which are used to describe certain details about the compiled project. One of these is AssemblyCulture.

I understand what the others are used for, but What is AssemblyCulture used to describe? Language? Currency? A bit of both?

Whenever I've seen this property, it's been left blank.

like image 858
Peach Avatar asked Sep 13 '11 12:09

Peach


People also ask

What's AC short for?

AC stands for 'alternating current' which means the current constantly changes direction. Mains electricity is an AC supply, and the UK mains supply is about 230 volts. It has a frequency of 50Hz (50 hertz), which means it changes direction and back again 50 times a second.

Does AC mean account?

A/C is an abbreviation for account/ current.

Which is correct AC or AC?

Senior Member. A/C unit (air conditioning unit) is a single machine. (e.g. What's that ugly box on your wall? - It's the air conditioning unit.) A/C (air conditioning) is the entire system, or the result it gives.

Why is there a in AC?

Why is there a slash between A and C in A/C? AC is used as an abbreviation for alternating current and A/C for air conditioning. For most people AC is used for alternating current because it was the first use of this abbreviation and A/C is used for air conditioning to differentiate from alternating current.


2 Answers

From the documentation:

The attribute is used by compilers to distinguish between a main assembly and a satellite assembly. A main assembly contains code and the neutral culture's resources. A satellite assembly contains only resources for a particular culture, as in [assembly:AssemblyCultureAttribute("de")]. Putting this attribute on an assembly and using something other than the empty string ("") for the culture name will make this assembly look like a satellite assembly, rather than a main assembly that contains executable code. Labeling a traditional code library with this attribute will break it, because no other code will be able to find the library's entry points at runtime.

To summarize: This attribute is used internally by the framework to mark the satellite assemblies automatically created when you add localized resources to your project. You will probably never need to manually set this attribute to anything other than "".

like image 163
Heinzi Avatar answered Sep 22 '22 05:09

Heinzi


When I googled your question I came up with a quick answer from this tutorial. It has a small description which I'm providing below and it looks like that's where you can specify localization but I'm not sure how much work it does for your assembly.

"AssemblyCultureAttribute Class implements AssemblyCulture attribute which is used to specify culture of an assembly as well as indicte that this is not a main assembly but rather its satellite.

[assembly: AssemblyCulture("de")] // German

"

like image 25
Jeff LaFay Avatar answered Sep 18 '22 05:09

Jeff LaFay