Actually I already did it. I have the reference removed and added again to be sure, but still the same error. there are at least 100 forms in the reference and I use most of them in this new application and the error occurs only with 2 of them, but the weirdst part is in debug mode it works like a charm.
I have already working single tier and three tier application . but i want to create a four tier application in my project solution using C# .If you know any one person this details Plz Send me solution of procedure
"Tiers" are not a procedural thing. It's a way of thinking. It's organizing your code for seperation of concerns based on the requirements and design of your application. You cannot learn this by looking at someone elses project.
To implement localization I have derived from DisplayNameAttribute: LocalDisplayNameAttribute. When using this attribute, I only want to declare the ResourceString an a default string. The class LocalDisplayNameAttribute should find out on it's own, which class and which assembly is using it.
My idea is, to find the strings in related resources by reflection. The strings should allways be in AssemblyName.Properties.Resources.
Is it possible for a attribute class, to find out, who it is used by?
publicclass LocalDisplayNameAttribute : DisplayNameAttribute
public LocalDisplayNameAttribute(string resourceName, string defaultText)
m_resourceName = resourceName;
string name = string.Empty;
name = SomeVodoo(base.DisplayNameValue);
name = base.DisplayNameValue;
privatestring SomeVodoo(string defaultText)
// Find out to which class an assembly we belong. Then Find the Properties.Resources of the assembly// and find the m_resourceName
You don't. An atribute should NOT EVER modify its behavior based on the class name it's attached to. The reason is that now your attribute functionality is directly tied to the classes it's looking for. That's bad!
If you need to modify the behavior of the attribute, then you need two or more attributes, one for each behavior.
Hello. I am using a hastable to store and retrieve class objects. Now I can successfully get an object based on some key but the problem is: I can not return it from within the function. Here is what I am trying
public ClassName FindObject(int nKey)
ClassName obj = new ClassName();
obj = (ClassName)HashTable[nKey];
Now the line (ClassName)HashTable[nKey] is successful to find the required object but obj is still equal to null. Thanks for any input on this.
This world is going to explode due to international politics, SOON.
The value associated with the specified key. If the specified key is not found, attempting to get it returns a null reference (Nothing in Visual Basic), and attempting to set it creates a new element using the specified key.
So what happens here is that whatever you passed into FindObject as a key has no instance of type ClassName associated with it.
"I had the right to remain silent, but I didn't have the ability!"