|
The first yeilds this:
public ResourceManager(string baseName, Assembly assembly)
{
StackCrawlMark mark1;
base..ctor();
if (baseName == null)
{
throw new ArgumentNullException("baseName");
}
if (assembly == null)
{
throw new ArgumentNullException("assembly");
}
this.MainAssembly = assembly;
this._locationInfo = null;
this.BaseNameField = baseName;
this.CommonSatelliteAssemblyInit();
mark1 = 1;
this._callingAssembly = Assembly.nGetExecutingAssembly(mark1);
if ((assembly == typeof(object).Assembly) && (this._callingAssembly != assembly))
{
this._callingAssembly = null;
}
}
The second:
public ResourceManager(Type resourceSource)
{
StackCrawlMark mark1;
base..ctor();
if (resourceSource == null)
{
throw new ArgumentNullException("resourceSource");
}
this._locationInfo = resourceSource;
this.MainAssembly = this._locationInfo.Assembly;
this.BaseNameField = resourceSource.Name;
this.CommonSatelliteAssemblyInit();
mark1 = 1;
this._callingAssembly = Assembly.nGetExecutingAssembly(mark1);
if ((this.MainAssembly == typeof(object).Assembly) && (this._callingAssembly != this.MainAssembly))
{
this._callingAssembly = null;
}
}
Maybe I'm not reading it right, but both of them look identical. Not quite sure why the second one didn't work...
Hawaian shirts and shorts work too in Summer.
People assume you're either a complete nut (in which case not a worthy target) or so damn good you don't need to worry about camouflage...
-Anna-Jayne Metcalfe on Paintballing
|
|
|
|
|
If C# is Microsoft's answer to SUN's Java,
then is C# Platform independent? Is C# more
similar to Jave to C++ or the opposite?
|
|
|
|
|
|
|
|
Thanks for the reply. You said something about parser,
would you mind explaning what is parser? I once read
an article in Java which mentioned something about
parser, I didn't understand at that time.(but neither
do I now)
Thanks.
|
|
|
|
|
Hi FriendS !! How do I draw graphics on the StatusBar ?
Thank you !!
|
|
|
|
|
Set the ShowPanels property to true, then add your panel to the StatusBar .
If you just want to draw an icon, set the Icon property to the icon you want to draw.
If you want to do something more complex, set the Style property on the panel to OwnerDraw then handle the DrawItem event on the StatusBar .
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
James Johnson is exactly right. After you create a panel for your status bar, just slap an icon on it. Like this:
//
// m_StatusBarPanel1
//
this.Icon = ((System.Drawing.Icon)(resources.GetObject("$this.Icon")));
this.m_StatusBarPanel1.Icon = Icon;
this.m_StatusBarPanel1.Text = "My Application...";
this.m_StatusBarPanel1.Width = 500;
Hope this helps.
|
|
|
|
|
this is my message in the forum iam curently a vb.net developer how could i start with c# is there is a big differance between the two
Have a nice Programming
|
|
|
|
|
In the end it all gets converted to IL, so all that distingushes them is how you write them I prefer C# because it 'feels' better to write. Its far more C/C++-esque. With that Java sent to its syntax.
You get far more street cred for using C# and all the ladies will love you.
"I have a strange ginger man living on my roof!"
"One of the most important things you learn from the internet is that there is no ‘them’ out there. It’s just an awful lot of ‘us’."
-Douglas Adams
Jonathan 'nonny' Newman
Homepage [www.nonny.com] [^]
|
|
|
|
|
HusEgypt wrote:
iam curently a vb.net developer how could i start with c# is there is a big differance between the two
I was/am a VB developer. When .NET came out I decided to try another language, see what all the hype about brace syntax was.
The biggest learning curve was true OO concepts and the .NET Framework itself. There are a ton of classes to learn and remember. Nothing mind bending though.
The switch from VB to C# was pretty easy actually. Syntax is just syntax for 90% of your code. It is only the 10% of hardcore stuff where you are using the specifics of a language that you will have trouble with.
So give it a bash, it really is not hard and you will come to learn that brace syntax rocks
Paul Watson Bluegrass Cape Town, South Africa
Chris Losinger wrote:
i hate needles so much i can't even imagine allowing one near The Little Programmer
|
|
|
|
|
Hello,
I was just wondering if anyone has a good explanation for the differences between static readonly fields and const fields?
The differences I can come up with are:
1. const fields can only be initialized at declaration
2. static readonly can be initialized at declaration or in a static constructor (either directly in the static constructor or through another method called from the static constructor using ref or out )
3. static readonly are changeable at runtime (app start); meaning each time the app is run this field can change
Example:
public class myClass
{
static readonly DateTime m_MyStart = DateTime.Now;
}
4. const fields are hard coded into the MSIL at compile time; meaning an app might use a constant from an assembly and later that assembly might change the constants, but the app doesn't realize the update until the app itself is rebuilt. (Can anyone rephrase this better than that? I suck at trying to describe this...)
Anyone else have differences or corrections to these?
Thanks,
Nathan
---------------------------
Hmmm... what's a signature?
|
|
|
|
|
That's pretty much it.
Const fields can only be used for types where there is a literal representation of the type, and the values are "burned into" the code that uses them.
Readonly fields can be used for any type, and the code that uses them references the constructed value at runtime.
|
|
|
|
|
Hi,
What is the best way to save an application and forms position (left & top) and size (width & height) so that when the user opens the app or form, it is displayed the same way it was last opened?
Is there a setting in .NET to accomplish this?
TIA,
Ben
|
|
|
|
|
Isn't that a Windows setting that user has control of ? I'm not sure if you can control it, but if so, it's likely one of the form properties.
There are only 10 types of people in this world....those that understand binary, and those that do not.
|
|
|
|
|
http://weblogs.asp.net/asmith/posts/3799.aspx
|
|
|
|
|
I have three combo boxes on a page. I have two tables, and have a dataset that access both of them. In the users table, I have an id, and an Employee name. The other table, inventory, stores references to these names, as well as supplies information. Now, the problem is, my combo box links to the employeeName, and sets that ID in the inventory table. With one combo box, this works fine. With two or more, what ever value you select in any combo box, will change all the other combo boxes to the same value. The reason for multiple combos, is I have fields in the inventory table, that record an employees name that signs a package in, and then another one for who is using it. Any suggestions? Would multiple dataSets be the solution?
|
|
|
|
|
Easy...
Combo.DataSource = Datatable.Copy();
|
|
|
|
|
This was asked on the DevelopMentor[^] lists not too long ago (02/25/03)... The solution as posted by Bob Beauchemin is to create a new binding context.
Current position in a DataSource is controlled by a CurrencyManager, which is associated with a DataSource/BindingContext pair. An application starts with a BindingContext per Form, controls inherit their parent's BindingContext.
Controls that have the same CurrencyManager (ie, same DataSource and same BindingContext) stay in sync. If you want controls that share the same DataSource NOT to stay in sync, you can allocate additional BindingContexts. This can be done for a group of controls through a common parent (ex. Panel) or on a per-control basis, ie.
dropdown1.DataSource = someds;
dropdown2.DataSource = someds;
// etc, binding other data properties
BindingContext bc = new BindingContext();
// don't want this dropdown synchronized
// if using same DataSource
dropdown2.BindingContext = bc;
Its a little heavy, but much better than making a copy of all of your data.
HTH,
James
"I despise the city and much prefer being where a traffic jam means a line-up at McDonald's"
Me when telling a friend why I wouldn't want to live with him
|
|
|
|
|
Hi!
Can you solve this problem?:
Do not loose SessionVariables when switching webapplications?
(I have a "FRAME" webapplication, which makes the authentication, menu,
and so on.
I wish to have more modules. These modules are optionally and i wont install all of them.
(possible way 1?)
I have my own SessionHandler wrapper, which can convert Requests into SessionVariables if it is neccessary. But, it seems to be a strange way. (not recommented, i think)
Problem:
i have more frames on clientside.
When i choose from menu (msiewebcontrols.TreeCtrl), i loose Session variables.
I fill up my menu from xml.(possible way?) so it is hard to encode runtime the xml.
so:
what about the same SessionHandleing in different webapplications?
Agyklon
|
|
|
|
|
How about just keeping it in a single web application? I have a portal, custom client area and web services running as one web application and it works fine that way.
Rocky Moore <><
|
|
|
|
|
Hm.
Right. But it isn't just a simple webapplication.
It has more independent functional modules.
(all of them separates bussinnes logic and userinterfaces.)
(some of them supports hardware handleing over ethernet or client side via COM1. The database structures are also different...etc...)
Do you know the way how to use
SessionStateServer service(in Sql mode), to solve this problem?
I don't want to write my own Sql sessionhandleing.
Is there a way to use stateservice from code?
Or there are some diffucilities, like sessionstate service guaranties the unique identifiers only by webapplications?
(and switching webapplication can couse an "identitiy conflict".)
AgyklonN
|
|
|
|
|
|