|
By paying them tens of thousands of dollars for a development kit?
|
|
|
|
|
In all seriousness though...I was looking into that a few years ago...it depends what you want to do.
You can go directly to the backend database if you just need to retrieve record data without the business logic. If you need/want the business logic, there is a web service interface you can use. Whether or not you have access to the web service configuration utility depends on whether the organization bought the appropriate modules.
EDIT: oh...and about the DLL...I don't know what that's from...it might be included in their SDK...to join the developer program and get access to the SDK was $50,000 when I spoke to them a few years ago.
|
|
|
|
|
Reference conversions: These are conversion from one reference type to another. Reference conversions, implicit or explicit, never change the referential identity of the object being converted. In other words, while a reference conversion may change the type of the reference, it never changes the type or value of the object being referred to.
can someone explain the above with examples, thanks.
|
|
|
|
|
I'll have a go..
Reference types are things which are on the heap and 'referred to' by a reference.
So
Cat cat = new Cat();
Would give you a cat reference to a cat object (on the heap).
You could convert this to an object
object cat2 = cat;
So now cat 2 is considered an object, but still it's really a cat. You could cast it back again.
Does that make sense?
Regards,
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote: I'll have a go..
Reference types are things which are on the heap and 'referred to' by a reference.
So
Cat cat = new Cat();
Would give you a cat reference to a cat object (on the heap).
You could convert this to an object
object cat2 = cat;
So now cat 2 is considered an object, but still it's really a cat. You could cast it back again.
Does that make sense?
Ok...
Now i diverge a bit, what is the purpose of reference type?
Let's say, Cat extends from Animal.
U can have the following:
Animal x = new Animal();
Cat y = new Cat();
Animal z = new Cat();
Is z a Cat?
If both Animal and Cat have a method call talk();
and since z.talk() will be calling from Animal and not Cat,
how can z be consider a cat, when it can't talk like a Cat?
|
|
|
|
|
Ok, this is all known as polymorphism and is the backbone of object oriented programming.
Firstly, the purpose of a reference type. They didn't exist in languages such as C++, you could create anything either on the heap or the stack, it was your choice. The rules in .NET are a bit more restrictive in that all reference types end up on the heap. It's the concept of maintaining a reference to a thing rather than the thing itself (which absolutely speaking isn't really correct). You can for example have two references to the same object instance. Try that with a value type and you could easily run into problems.
Animal z = new Cat();
Here you have an animal reference to a cat instance. When you call Talk(), whether Animal.Talk() gets called or Cat.Talk() gets called depends on whether that method has been marked as virtual .
If not virtual Animal.Talk() gets called, hopefully for obvious reasons. If the method is virtual however, the runtime will start working through something that used to be called a v-table (don't know what it is in .net) based on the type of the instance not the type of the reference. Cat.Talk() gets called.
This way you can implement Cat.Talk, Dog.Talk, Chicken.Talk, treat any of them as an animal, and call Talk() and it will get resolved to the correct method.
Regards,
Rob Philpott.
|
|
|
|
|
Rob Philpott wrote: They didn't exist in languages such as C++, you could create anything either on the heap or the stack, it was your choice. The rules in .NET are a bit more restrictive in that all reference types end up on the heap.
Just to add to that, there is a very good reason for this. When items could be created on the stack, the C/C++ function was at liberty to generate a pointer to it (effectively a C# reference). This could then be passed outside the function even if the function ended and the stack was reset. You then had a pointer to valid memory, but that could be currently in use by some other function. Nasty bugs resulted!
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
OriginalGriff wrote: Nasty bugs resulted!
Not for real men they didn't. OK, occasionally...
Regards,
Rob Philpott.
|
|
|
|
|
Rather informative, thanks.
Then why C# don't sth like Java where the methods are declared virtual by default?
|
|
|
|
|
u0605094 wrote: how can z be consider a cat, when it can't talk like a Cat?
But it can - you just have to cast it back to a cat. ((cat) z).talk()
The advantage is that you can treat all common properties in the same way. So, you can have a generic series of methods that will work on any animal or class derived from an animal - think of List, which supports Object or anything which derives from an Object - i.e. everything. You don't have to produce a List for Animal and a List for Cat - they can both reside in the same List.
No trees were harmed in the sending of this message; however, a significant number of electrons were slightly inconvenienced.
This message is made of fully recyclable Zeros and Ones
|
|
|
|
|
Was this an interview question?
There's really nothing to explain.
Let's say you used ExecuteScalar to return an integer value from a database. The compiler doesn't know that the value is an int, all it knows is that the value's type derives from object. But you, the programmer, know it's an int (and not null) so you tell the compiler:
int x = (int) cmd.ExecuteScalar() ;
This type of cast is not a conversion, it's merely a note to the compiler that assigning the value to a variable of type int is safe.
|
|
|
|
|
I am creating a project it contains two textbox.
In first TextBox i paste text from an excel sheet.
On click of button it generates some code set it to text property of Second TextBox.
currently i compile & excute project, generate code and then i paste to my project and then again i compile & execute project again to run this code.
As i can't past the screen shot of that here else i can explain it well anyway if any body want to discuss i am available
|
|
|
|
|
WinSolution wrote: i can explain it well anyway if any body want to discuss i am available
Explaining it clearly at the first place didn't look like a good idea to you?
It is a crappy thing, but it's life -^ Carlo Pallini
|
|
|
|
|
Dear
I have explained my problem as best as i can.
I was meant to say that i was able to explain better if there was a support of pasting image
Rajesh : did you start reading my post from bottom
|
|
|
|
|
WinSolution wrote: I have explained my problem as best as i can.
Unfortunately not well enough for us to understand exactly what it is you are trying to do. I'm wondering whether you're trying to run Excel in your app, or convert information from Excel to C# code, which you want to compile and run. Or perhaps something else...
WinSolution wrote: I was meant to say that i was able to explain better if there was a support of pasting image
There are several free image hosting sites where you can upload your images and provide links to them.
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
I am working in an organization in which i update the record to a central tracker. Mostly data provided to me is in Excel.
I pick the data from excel paste it into first TextBox. Data cosist of Two Columns as mentioned below
________________________
Site ID | DN Received |
------------------------
MDWH2813 | 10-May-08 |
MDWH2814 | 10-May-08 |
MDWH2739 | 10-May-08 |
------------------------
i will copy data excluding the header area from the upper section and paste it into 1st textbox that looks like as follow
MDWH2813 10-May-08
MDWH2814 10-May-08
MDWH2739 10-May-08
Then i click on a button and i generates a C# code as under and set as text on 2nd TextBox
updateCentralTracker("MDWH2813","10-May-08");
updateCentralTracker("MDWH2814","10-May-08");
updateCentralTracker("MDWH2739","10-May-08");
currently i copy the generated code from 2nd TextBox. copy it to my solution and rebuild & execute and then i click on the second button that executes the code and data is updated to the Central Tracker.
but i want when i generate the code on first run then i click on the second button and it should run that code at run time
i hope its now understandable
let me know if any query
|
|
|
|
|
Instead of trying to recompile on the fly, why don't you just parse the data you are already pasting into the box and issue your command to upload...all in one step?
Maybe I am missing the point but it looks like you are trying to make a simple solution as difficult as possible.
|
|
|
|
|
|
Do you want to automatically compile and run the text you outputted to your second textbox?
That's entirely possible, but before I look up an article about runtime compilation for you I'd like to know whether this was really what you had in mind..
|
|
|
|
|
Yes you are right
i dont want to compile but only execute.
but pasting it at desired place where currently i paste it manually
ignore the last line if you are not able to understand its about sequence/placement of auto. generated code.
|
|
|
|
|
|
WinSolution wrote: Then i click on a button and i generates a C# code as under and set as text on 2nd TextBox
updateCentralTracker("MDWH2813","10-May-08");
updateCentralTracker("MDWH2814","10-May-08");
updateCentralTracker("MDWH2739","10-May-08");
currently i copy the generated code from 2nd TextBox. copy it to my solution and rebuild & execute and then i click on the second button that executes the code and data is updated to the Central Tracker.
but i want when i generate the code on first run then i click on the second button and it should run that code at run time
Is it not possible to use the information from the text box directly? Something like "updateCentralTracker(string1, string2);"?
Is there some reason you have to create explicit string constants for the parameters?
There are three kinds of people in the world - those who can count and those who can't...
|
|
|
|
|
Thanks for your valuable contribution. both (Searril & molesworth )
Yes that is possible but as this data is going to be update in central tracker and is copy pasted from excel file and there are chances that it can break my algorithm in some conditions when data is not provided to me in expected format. so i want to confirm it once time by watching it.
another point ; i am generating code to avoid loop in case i don't generate code i have to go through each line and apply my algo on it and then to send update to tracker and i cannot also verify it visually.
so it will be best solution to the problem if i can rum my code at runtime in my opinion else there are 101 way to do it.
|
|
|
|
|
hi
I am using one C++ dll in my C# compact frame work application
C#
private void button1_Click(object sender, EventArgs e)
{
try
{
Message("vijay");
//OpenDatabase(hDB, guid);
}
catch (DllNotFoundException de)
{
MessageBox.Show(de.Message, "Dll not found");
}
catch (EntryPointNotFoundException ent)
{
MessageBox.Show(ent.Message, "Entry point ex");
}
catch (MissingMethodException me)
{
MessageBox.Show(me.Message, CallingConvention.Winapi.ToString());
}
}
____________________
C++ dll:
#include "windbase.h"
#include <string.h>
CEOID CeOid = 0;
CEGUID guid;
BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved )
{
return TRUE;
}
extern "C" __declspec(dllexport) void __stdcall Message(TCHAR* p_szMessage)
{
MessageBox(NULL, p_szMessage, _T("Message from DLL"), MB_OK);
}
_________
This is my code but it is showing that message missing exception.
Can Any one help me in figuring out the error area.
Thanks in Advance
|
|
|
|
|
Hi all,
I want to run .ppsm file in slideshow window using c# in web based application without opening presentaion in powerpoint. I was given anchor link like following -
<a href="CD-12 Open Value Module EMEA and Latam BlackWhite.ppsm"> Open/Save </a>
When I open html page in IE8 & click on "Open/Save" link it launch a open/Save dailog box and when click on Open button it open the .ppsm file in powerpoint application but not run the file in slideshow window.
So please help me How to run the .ppsm file using C# in web based application.
Please give me an example if these are possible in any way.
Thanks in Advance
Regards,
Anil Dwivedi
|
|
|
|