|
You might want to look and the bottom of this[^] page. You might also want to look at the top of that page for the best Reflector for .NET.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
Plz, help me...
When i try to generate metadata from my remote server in dll file using SoapSuds
soapsuds -url:http://localhost:8001/Server?WSDL -oa:Server.dll
it throws an error:
The type or namespace 'Drawing' does not exists in the class or namespace 'System'
What should I do?
best regards, FLUID
|
|
|
|
|
I would change the soapsuds command line to generate code instead of an assembly. It is clear that one of your exported methods is using something like System.Drawing.Point which clearly does not exist in that "Server.dll" assembly.
|
|
|
|
|
:(Hi all,
Interesting problem here. I was working on a simple winform in VS2003 on XP Pro SP2 and in the form designer I could see my 3 text boxes, 2 labels and a button control - but... when I go to run it, all I see is an empty form? Has anyone seen this and how do you overcome it?
|
|
|
|
|
Hi,
I am attempting to simulate a drag n drop operation in one of my custom components (build from scratch). For this reason, I was changing the cursor to a custom drag cursor (that will give the appearance of dragging) which is defined static and will be read from the file as follows:
private static Cursor dragCursor = new Cursor(".\Images\MyCursorFile.cur");
It loads fine and I am able to use it quite well. However, sometimes, the cursor just does not show and I have to close and re-open my application to get back the cursor. I have no clue why this happens as there is no reproducable path to the problem.
Any ideas? (Or any other way to load a .cur file without having to load from a file?)
Thanks.
Regards,
Rajesh
|
|
|
|
|
I have a question on code found here at code planet.
url is: http://www.codeproject.com/csharp/2WayConnection.asp
Can someone who is good with tcp and http please review the page and then tell me whether they are qualified enough to answer a question.
This question pertains to the req.Body in the Connection class.
I wanted to email the author but couldnt find an address.
Any help would be appreciated.
Steve Welborn
Software Architect
|
|
|
|
|
At the end of the article page you will find this ATRICLE forum ,you can post your question to it ,and he will be notified.
|
|
|
|
|
No kidding?
Learn things new everyday.
Thanks man, have a great afternoon.
Steve Welborn
Software Architect
|
|
|
|
|
Hello.
Does anyone know if I can open an image, convert the colors from RGB to CMYK and save it back? And without using any commercial components or libraries.
thank you
|
|
|
|
|
Can anyone tell me if there is something like pointer in C#. If I want to interchange two rows in a mtrix which is the most efficient way? In C, probabaly we can use, if we wan to elliminate the extensive use of the stoarage space.
Regards,
Amit
|
|
|
|
|
You can use regular old pointers in C#. You just have to do it in an unsafe context:
unsafe static void WriteLocations()
{
int *p;
int i;
i = 10;
p = &i;
string addr;
addr = int.Format((int) p, "X");
Console.WriteLine(addr);
Console.WriteLine(*p);
*p = 333;
Console.WriteLine(i);
i = *(&i) + 10;
Console.WriteLine(i);
}
Also, instead of marking a class or function as static, you can mark portions of code as unsafe:
void DoSomething()
{
unsafe
{
}
}
Also note that the C# compiler needs the /unsafe switch turned on in order to use unsafe code.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Homosexuality in Christianity
Judah Himango
|
|
|
|
|
Thanks Judah!
How can one function be unsafe? what is a unsafe code.
regards,
Amit
|
|
|
|
|
Unsafe code is
- code that cannot be verified as type-safe by the .NET Common Language Runtime (CLR).
- is not Common Language Specification (CLS)-compliant, meaning that other .NET languages like VB.NET, J#, and so on are not required to implement nor are they guaranteed to consume such code, if it were declared as public and made available to other .NET dlls & executables.
- requires a full trust security scenario in order to run, for instance, it must be installed/run from the target machine; if you try to use pointers in code run in a partial-trust scenario (e.g. a C# applet over the internet), the .NET CLR will throw a SecurityException because pointers require full access to the machine's memory, thus are potentially dangerous to the end user.
For a function, class, or code block to be unsafe, just use the unsafe keyword:
unsafe class MyClass
{
}
unsafe void MyFunction()
{
}
void MyFunctionWithUnsafeBlock
{
unsafe
{
}
}
Despite all these cautions, you're free to use pointers as much as you like if your application is a standalone app or dll, indeed, the .NET framework uses pointers internally quite often for performance gains and interop scenarios.
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Homosexuality in Christianity
Judah Himango
|
|
|
|
|
There is seldom any real need for pointers. Can't you use a reference instead?
---
b { font-weight: normal; }
|
|
|
|
|
I really wanted to use something which can allow me to interchange position of two rows in a 2D array. say i want to make 3rd row 7th row and place 7th row as the third row. I don't want to use a temporary 1Darray for that. If each row has say 1000 elements, then i need 1000 temporary varibale to do the calculation. I don't want to do that.
|
|
|
|
|
What does the array contain?
If it contains objects, it's really an array of references. Then you can easily exchange different elements in the array.
---
b { font-weight: normal; }
|
|
|
|
|
Ironically, it contains double precision numerical value. Is there a way? How can I change the reference if it consists of objects.
Regards,
Amit
|
|
|
|
|
A double is a value type, not an object, so the array does not contain references. You have to exchange the values.
---
b { font-weight: normal; }
|
|
|
|
|
Well, arrays in C# can be seen as pointers. If you copy one via assigning another one (e.g. a1 = a2) then you don't get a real copy a2, you just get a new reference.
Greetings
|
|
|
|
|
I need to generate Excel Reports using Pre-Created Excel Template.
Data is fetched from the databse. Does any one know any managed open source tool
to achieve this? All help is appreciated.
Thanks,
Alomgir
|
|
|
|
|
How to write common event handler which can accept range through EventArgs.Is it possible to write my own Eventargs derive from System.EventArgs, so that i
can pass arguments when event handlers get called. Please tell me how to acheive this.
I have two textboxes called textbox1 and textbox2 each accept integer values with different range
textbox1 accept values between 1800-2200
textbox2 accept values between 2400-2800
i have onenter event handler for both the textboxes like this
//delegate and event handler for first text box
this.YearBuiltTextBox.Enter += new EventHandler(Parse_TextBox1);
public void Parse_TextBox1(System.Object sender, System.EventArgs e)
{
try
{
if (this.YearBuiltTextBox.Enabled == false) return;
object parseValue = DataFormatter.ParseInteger(this.YearBuiltTextBox.Text,1800, 2200);
}
}
//delegate and event handler for second text box
this.YearRenovateTextBox.Enter += new EventHandler(Parse_TextBox2);
public void Parse_TextBox2(System.Object sender, System.EventArgs e)
{
try
{
if (this.YearRenovateTextBox.Enabled == false) return;
object parseValue = DataFormatter.ParseInteger(this.YearBuiltTextBox.Text,2400, 2800);
}
}
How to write common event handler for this...
|
|
|
|
|
Yes, you can derive your own class from EventArgs and add custom fields to it.
I'm wondering how it would help you solve your problem, in your case, you know beforehand the range of valid values that YearBuiltTextBox and YearRenovateTextBox can accept. Why not put the range information in a hashtable or similar datastructure and do the ParseInteger stuff after retrieving the range?
I'm suggesting something like this
Hashtable rangeMap = new Hashtable();
rangeMap[YearBuiltTextBox] = new int[] {1800, 2200};
rangeMap[YearRenovateTextBox] = new int[] {2400, 2800};
this.YearRenovateTextBox.Enter += new EventHandler(Parse_TextBox);
this.YearBuiltTextBox.Enter += new EventHandler(Parse_TextBox);
and withing ParseTextBox
public void Parse_TextBox(System.Object sender, System.EventArgs e)
{
int[] range = (int[])rangeMap[sender];
object parseValue = DataFormatter.ParseInteger(this.YearBuiltTextBox.Text,range[0], range[1]);
}
Hope this helps.
Regards
Senthil
_____________________________
My Blog | My Articles | WinMacro
|
|
|
|
|
you could use one event hander for both textBoxes i.e.
<br />
textbox1.enter += new EventHandler(myEventHandler);<br />
textbox2.enter += new EventHandler(myEventHandler);<br />
public void myEventHandler(object sender,EventArg e)<br />
{<br />
<br />
TextBox tmpBox = (TextBox)sender;<br />
if(tmpBox.Name == "textbox1")<br />
{<br />
}<br />
else<br />
{<br />
}<br />
}<br />
|
|
|
|
|
If you need to, you can write your own event arguments simply by writing a class that derives from System.EventArgs.
However, you wouldn't be able to raise the event with your new arguments unless you inherit from the TextBox class and raise it yourself with your own arguments.
Here is a common handler for both:
this.yearBuiltTextBox.Enter += new EventHandler(Parse_TextBox);
this.yearRenovateTextBox.Enter += new EventHandler(Parse_TextBox);
void ParseTextBox(object sender, EventArgs e)
{
TextBox tbSender = (TextBox)sender;
if(sender.Enabled == false)
{
return;
}
int min, max;
if(tbSender == this.yearBuiltTextBox)
{
min = 1800;
max = 2200;
}
else
{
min = 2400;
max = 2800;
}
object parseValue = DataFormatter.ParseInteger(this.yearBuiltTextBox.Text, min, max);
}
Tech, life, family, faith: Give me a visit.
I'm currently blogging about: Homosexuality in Christianity
Judah Himango
|
|
|
|
|
Judah Himango wrote:
if(sender.Enabled == false)
object doesnt have an enabled property, so the above quoted line should have read
if(tbSender.Enabled == false)
or
if(!tbSender.Enabled)
|
|
|
|