|
Fayu wrote: I wanted to see what the experts had to say.
No you don't, that's twittering garbage. If your statement was true you would be reading the Microsoft Documentation rather than posting your garbage in internet forums.
|
|
|
|
|
If you think my posting is garbage, you did not have to respond.
|
|
|
|
|
Fayu wrote: you did not have to respond.
How do you know what I have to do? Oh right, you're one of those guys that just knows stuff huh?
|
|
|
|
|
I think this is a bit odd, and reflection is generally quite slow
|
|
|
|
|
Fayu wrote: What do you guys think of this technique?
Not sure. Why would you do it this way? Does it offers something good?
जय हिंद
|
|
|
|
|
I used this in a base class. When I inherited the base class in other classes, I did not have to worry about populating their properties (or performing other logic), the base class would do it. The other classes that inherited the base class were 'templates'.
|
|
|
|
|
I've done something similar as a learning exercise. Property names and values are read from an encrypted XML file, and I create it entirely using LINQ. It's actually remarkably elegant
|
|
|
|
|
That's fairly dreadful. Better to have a constructor (or initializer) that takes a DataReader and populates itself.
I don't see much point in having a class use Reflection to discover its own properties. Particularly if it's a base class discovering information about classes that derive from it. That's a big no-no.
But if you insist on doing this; I would make one library method (perhaps an Extension Method) that takes both the object to set and the DataReader; and I would not have it use Reflection on each call, I would have it cache the PropertyInfo array the first time it encounters a class and then use the cache thereafter.
|
|
|
|
|
Hi there ,i am developing a game in which i want to use A*(A-star ) Algorithm for the enmey to detect the player position on the basis of the values on the data bases in which there are 5 attributes (left ,right ,up,down ,current).they have the zero value if it can not move to that direction
e.g left =0,right=2,up=3,down=0, current=1, if it moves to right then the current value becomes the 2 .
the problem i am having regarding the A-star algo is what is going to be heuristic h for it in F=g+h.how it going to be calculated what will be the critria for it.
thanks in Advance,
|
|
|
|
|
Why do you choose to put your post on this forum?
Why dont you try posting on a relevant forum like GameDev.Net forums[^]
Life goes very fast. Tomorrow, today is already yesterday.
|
|
|
|
|
thanxs for ur suggestion i will try this too.
|
|
|
|
|
hai all,
We have taken a Public IP ,we have to create a folder through windows application in that remote system with this Public IP?
we tried this like :
DirectoryInfo Dir = new DirectoryInfo(@"//" + path + "/Main Folder/Sub Folder/");
if (!Dir.Exists)
{
Dir.Create();
}
we got this bellow error :
"The Net work path was not found "
|
|
|
|
|
do you have the network credential to creat a folder there? ... ???
|
|
|
|
|
Hi,
How can i draw a rectangle and ellipes in a user control or in a bitmap without erasing the background, also i need to able to change the thickness and color.
Can i get a simple exapmle?
Thankyou
YPKI
|
|
|
|
|
There are hundreds, if not thousands, of 'Drawing/Sketching' articles, both here on CodeProject and elsewhere.
Search around!
When you find one you like, have a go at altering it to suit.
If you get stuck somewhere whilst doing that, then come back here with a specific problem.
Henry Minute
Do not read medical books! You could die of a misprint. - Mark Twain
Girl: (staring) "Why do you need an icy cucumber?"
“I want to report a fraud. The government is lying to us all.”
|
|
|
|
|
|
pwm1964 wrote: I don't run into all the gotchas associated with applying the wrong techmology
In that case you might want to start with a spellchecker.
Just kidding. Now to seriously answer your question. Is that your idea of requirements? Really? If you think what you posted qualifies as the entire set of requirements applicable to the question you posed, then there is nothing here anyone can do to help you, try as they might.
pwm1964 wrote: I want to start off on the "right" path
The right path, always has been and always will be, to study the techmologies you need to use so that you understand them well enough to use them correctly, period. The fact that you posted this question in an internet forum is a contradiction to your statement.
But good luck anyway
|
|
|
|
|
|
Hi,
I had small application of BHO through which I can get all the HTML Elements of a webpage through DwebbrowserEvents. but when I click an anchor element which has attributes href and target, say target = "new" and href = "efiling/NewFormsFees.pdf", the newwindow is opened, but unable to get the newwindow handle, I mean if I perform any operation on webbrowser.Document, these reflects on old window but not on newwindow in which PDF file is opened. How can I get access of newwindow in which pdf file is opened?
|
|
|
|
|
I wrote following C code in notepad;
//Test.c File
__declspec (dllexport) int MyFunc (void)
{
return 5;
}
And compile on command prompt using with Borland C++ 5.5.1 compiler with following command;
bcc32 -tWD Test.c
And use in C#.NET 2008 with following code;
[DllImport("Test.dll")]
static extern int MyFunc();
private void button1_Click(object sender, EventArgs e)
{
int str = MyFunc();
}
BUT I GET ERROR!!! Entry Point Was Not Found.
What can I do???
|
|
|
|
|
C# isn't a procedural language, but an Object Oriented language. This is what an 'empty' console application looks like;
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
}
}
}
There's a Button1_Click , so I guess you want to build a Windows-application. I suggest you download SharpDevelop and use that to create your Windows application. You can use notepad to inspect the source that it generates
I are troll
|
|
|
|
|
Or maybe he posted a snippet instead of All of his code..
|
|
|
|
|
That might be, we'll find out when he (or she, or they) answers
--edit--
-tWD -> creates a DLL and there's no exception reported on the compilation of the Borland C library.
It would help to know where the error occurs (on start of the .NET project, or when calling the library)
I are troll
modified on Monday, March 23, 2009 10:10 AM
|
|
|
|
|
I get error when I call function on C#.NET application.
|
|
|
|
|
the error occurs in c++ code not in c#(test.c), your library doesn't have main library entry point
please read how to create dynamic library in windows
read this[^] first as reference
hope it helps
dhaim
ing ngarso sung tulodho, ing madyo mangun karso, tut wuri handayani. "Ki Hajar Dewantoro"
in the front line gave a lead, in the middle line build goodwill, in the behind give power support
|
|
|
|