|
thanks bhiller..
I think code project may have attached that code.
|
|
|
|
|
hello - any idea on this sort of exception?
<br />
+ [System.InvalidCastException] {"<br />
[A]MyLib.SomeAccount cannot be cast to [B]MyLib.SomeAccount. <br />
Type A originates from in the context 'Default' at location <br />
'Y:\\MySrcCode\\FolderA\\Debug\\MyAcct.dll'. <br />
Type B originates from 'MyLib, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' in the context 'LoadFrom' at location <br />
'Y:\\MySrcCode\\FolderB\\Debug\\MyAcct.dll'."} System.InvalidCastException<br />
Note, class exactly the same... but folder different ... how to resolve...?
This may be hint but...[^]
Another hint here[^]
|
|
|
|
|
Those are two different classes, in two different assemblies. They may look the same, the may have the same implementation; but they're not the same class.
I are Troll
|
|
|
|
|
Use the WCF forum for WCF questions.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
|
hi guys
how to known that exits blutooth on pc?
if this class of wmi function is true ?
Win32_NetworkAdapter ??
thanks a lot
|
|
|
|
|
yes, I would enumerate the Win32_NetworkAdapters; when Bluetooth is present, there will be one that seems to have "Bluetooth" in its Name, Description and ProductName fields.
|
|
|
|
|
thanks
that is good
but when we put bluetooth in usb windows install that driver and when we drop out from usb the software of that is exist and after that we run program represent bluetooth but must not represent
i following this
|
|
|
|
|
I don't know how to tell whether Bluetooth is enabled or disabled, the Win32_NetworkAdapter content doesn't get changed by switching it on or off.
|
|
|
|
|
behzadcp wrote: i following this
I am so glad someone is! I'm not following that at all...
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
really? maybe you should work out more. It isn't going any real distance, it is about Bluetooth after all.
|
|
|
|
|
WHAT!? You mean the "E" word? Gulp!
Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.
|
|
|
|
|
Curious - for simple array such as string[], if I declare known type from interface, they just won't show on object browser (but other custom/non-System types developed in-house can), thus the infamous:
<br />
There was an error while trying to serialize parameter http:
I have to resort to set it programmatically from proxy in order to get it working:
<br />
foreach (var operation in proxy.Endpoint.Contract.Operations) <br />
{ <br />
operation.KnownTypes.Add(typeof(MyDynamicallyAddedKnownType)); <br />
} <br />
why...
|
|
|
|
|
Ummm... what? You must be doing something wrong.
|
|
|
|
|
You're asking this in the wrong forum. Use the WCF forum instead.
.45 ACP - because shooting twice is just silly ----- "Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997 ----- "The staggering layers of obscenity in your statement make it a work of art on so many levels." - J. Jystad, 2001
|
|
|
|
|
Dose anyone know how to contact form1 from form2 without opening a new form? this is my code.
Form1 form1 = new Form1();<br />
if (e.KeyData == Keys.Escape)<br />
{<br />
this.Visible = false;<br />
form1.timeToolStripMenuItem.Checked = false;<br />
}
|
|
|
|
|
You don't really give a good example of what you are trying to accomplish, but I'll try answering anyway...
I assume that is code from an already opened Form2. Create a public property on Form1. Then set that property from form2. Or pass a value into the constructor. Or use an event. Or a delegate passed via the constructor.
|
|
|
|
|
|
Can you please give me a example?
|
|
|
|
|
First you have to explain better what you're trying to achieve, because we don't know what is it you want to accomplish.
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
Well imagine that just opened form2 form form1 and form1 needs to change its check box to be checked because you just opened form2. So then it will check form1's check box because you just opened form2. I hope this was a good example
|
|
|
|
|
Make public your control timeToolStripMenuItem on Form1 and access it from Form2 e.g:
Form2.timeToolStripMenuItem.Checked=false;
I Love T-SQL
"Don't torture yourself,let the life to do it for you."
If my post helps you kindly save my time by voting my post.
www.aktualiteti.com
|
|
|
|
|
|
That's not a good approach (I mean "best practices" state that all fields should be static).
You have two approaches:
1. Create public property in form1 that exposes your checkbox as readonly:
public CheckBox CheckboxPublicName
{
get
{
return this.timeToolStripMenuItem;
}
}
And in form2 you can do form1.CheckboxPublicName.Checked = true;
2. This one is (I think) better. You expose property, that provides access to "checked status" of the checkbox
public bool SomeName
{
get
{
return this.timeToolStripMenuItem.Checked;
}
set
{
this.timeToolStripMenuItem.Checked = value;
}
}
And you only have to set this property to true/false.
Don't forget to rate answer, that helped you. It will allow other people find their answers faster.
|
|
|
|
|
ok but you forget, this needs to be done in
<br />
if (e.KeyData == Keys.Escape)<br />
{<br />
<br />
}
|
|
|
|