473,670 Members | 2,228 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Type "assurance" of derived classes

Hi All,

I'm coming from Java to C++ and this is one of the very last problems I
have so far... In Java, if I have, say, a class SISNode that extends
NetworkNode, I can have a function that returns a NetworkNode but I can
assure the compiler that it is in fact a SISNode and therefore call the
method getStatus() that only a SISNode has. Like

SISnode s,t;
NetworkNode n;
n =t;
n.getStatus();//won't work
s= (SISNode) n;
s.getStatus(); //will work
....
....

I'm now looking for some way to do this in C++. I do agent-based network
simulations, and I want to derive all kinds of agents from a generic
network node type. This network node is supposed to store his neighbours
in a std::list<Gener icNetworkNodeli st. Now in the derived classes I
can obtain the neighbours, but I cannot call their methods unless they
were already declared in the GenericNetworkN ode declaration.

Anybody knows how to solve this problem? A hint in the right direction
(keyword) would be more than enough....

Thanks

Oliver
Aug 14 '08 #1
8 1639
Oliver Graeser <gr*****@phy.cu hk.edu.hkwrites :
Hi All,

I'm coming from Java to C++ and this is one of the very last problems
I have so far... In Java, if I have, say, a class SISNode that extends
NetworkNode, I can have a function that returns a NetworkNode but I
can assure the compiler that it is in fact a SISNode and therefore
call the method getStatus() that only a SISNode has. Like

SISnode s,t;
NetworkNode n;
n =t;
n.getStatus();//won't work
s= (SISNode) n;
s.getStatus(); //will work
No it won't.
...
...

I'm now looking for some way to do this in C++. I do agent-based
network simulations, and I want to derive all kinds of agents from a
generic network node type. This network node is supposed to store his
neighbours in a std::list<Gener icNetworkNodeli st. Now in the derived
classes I can obtain the neighbours, but I cannot call their methods
unless they were already declared in the GenericNetworkN ode
declaration.

Anybody knows how to solve this problem? A hint in the right direction
(keyword) would be more than enough....
This is not possible, with what you wrote above and the assumed
declarations. You must realise that when you run n=t; you lose all
the information specific to a SISNode. There is no way to build it
back.

That's why I consider that C++ objects should always be allocated
dynamically and referend thru a pointer.

If you had written:

class SISNode:public NetworkNode {...};

SISNode* s=new SISNode();
NetworkNode* n=s;

then you could write:

SISNode* nAsSISNode=dyna mic_cast<SISNod e*>n;
if(nAsSISNode!= 0){ nAsSISNode->getStatus(); }

--
__Pascal Bourguignon__
Aug 14 '08 #2
On 2008-08-14 12:44, Pascal J. Bourguignon wrote:
Oliver Graeser <gr*****@phy.cu hk.edu.hkwrites :
>Hi All,

I'm coming from Java to C++ and this is one of the very last problems
I have so far... In Java, if I have, say, a class SISNode that extends
NetworkNode, I can have a function that returns a NetworkNode but I
can assure the compiler that it is in fact a SISNode and therefore
call the method getStatus() that only a SISNode has. Like

SISnode s,t;
NetworkNode n;
n =t;
n.getStatus( );//won't work
s= (SISNode) n;
s.getStatus( ); //will work

No it won't.
>...
...

I'm now looking for some way to do this in C++. I do agent-based
network simulations, and I want to derive all kinds of agents from a
generic network node type. This network node is supposed to store his
neighbours in a std::list<Gener icNetworkNodeli st. Now in the derived
classes I can obtain the neighbours, but I cannot call their methods
unless they were already declared in the GenericNetworkN ode
declaration.

Anybody knows how to solve this problem? A hint in the right direction
(keyword) would be more than enough....

This is not possible, with what you wrote above and the assumed
declarations. You must realise that when you run n=t; you lose all
the information specific to a SISNode. There is no way to build it
back.

That's why I consider that C++ objects should always be allocated
dynamically and referend thru a pointer.

If you had written:

class SISNode:public NetworkNode {...};

SISNode* s=new SISNode();
NetworkNode* n=s;

then you could write:

SISNode* nAsSISNode=dyna mic_cast<SISNod e*>n;
if(nAsSISNode!= 0){ nAsSISNode->getStatus(); }
And, assuming that NetworkNode is derived from GenericNetworkN ode you
can then use std::list<Gener icNetworkNode*t o store them. Though it
might be worth to follow Alf's advice and use some kind of smart pointer
(which would make it std::list<Smart PointerType<Gen ericNetworkNode ).

--
Erik Wikström
Aug 14 '08 #3
On Aug 14, 8:03 pm, Erik Wikström <Erik-wikst...@telia. comwrote:
On 2008-08-14 12:44, Pascal J. Bourguignon wrote:
Oliver Graeser <grae...@phy.cu hk.edu.hkwrites :
I'm coming from Java to C++ and this is one of the very
last problems I have so far... In Java, if I have, say, a
class SISNode that extends NetworkNode, I can have a
function that returns a NetworkNode but I can assure the
compiler that it is in fact a SISNode and therefore call
the method getStatus() that only a SISNode has. Like
SISnode s,t;
NetworkNode n;
n =t;
n.getStatus();//won't work
s= (SISNode) n;
s.getStatus(); //will work
This is supposed to be Java, I suppose.

The exact equivalent in C++ would be:

SISnode* s ;
SISnode* t ;
NetworkNode* n ;
n = t ;
n->getStatus() ; // won't work
s = dynamic_cast< SISnode* >( n ) ;
s->getStatus() ; // will work./
No it won't.
I think his example is supposed to be Java. Otherwise, it won't
compile.
...
...
I'm now looking for some way to do this in C++. I do
agent-based network simulations, and I want to derive all
kinds of agents from a generic network node type. This
network node is supposed to store his neighbours in a
std::list<Gener icNetworkNodeli st. Now in the derived
classes I can obtain the neighbours, but I cannot call
their methods unless they were already declared in the
GenericNetworkN ode declaration.
Anybody knows how to solve this problem? A hint in the
right direction (keyword) would be more than enough....
The two important points to remember are that C++ has value
semantics by default, you have to explicitly use pointers or
references to get reference semantics, and that the equivalent
to Java's cast operator in C++ is dynamic_cast.
This is not possible, with what you wrote above and the assumed
declarations. You must realise that when you run n=t; you lose all
the information specific to a SISNode. There is no way to build it
back.
If they above were C++, he'd not loose any type information.
But he'd get a new object (with a new type), which is probably
not what he wants.
That's why I consider that C++ objects should always be
allocated dynamically and referend thru a pointer.
That's valid for entity objects, but not for value objects.
If you had written:
class SISNode:public NetworkNode {...};
SISNode* s=new SISNode();
NetworkNode* n=s;
then you could write:
SISNode* nAsSISNode=dyna mic_cast<SISNod e*>n;
if(nAsSISNode!= 0){ nAsSISNode->getStatus(); }
And, assuming that NetworkNode is derived from
GenericNetworkN ode you can then use
std::list<Gener icNetworkNode*t o store them. Though it might
be worth to follow Alf's advice and use some kind of smart
pointer (which would make it
std::list<Smart PointerType<Gen ericNetworkNode ).
If these are entity objects, as it would seem, I don't know of a
smart pointer that would really be appropriate.

--
James Kanze (GABI Software) email:ja******* **@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientier ter Datenverarbeitu ng
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Aug 14 '08 #4
James Kanze wrote:
On Aug 14, 8:03 pm, Erik Wikström <Erik-wikst...@telia. comwrote:
>On 2008-08-14 12:44, Pascal J. Bourguignon wrote:
>>Oliver Graeser <grae...@phy.cu hk.edu.hkwrites :
I'm coming from Java to C++ and this is one of the very
last problems I have so far... In Java, if I have, say, a
class SISNode that extends NetworkNode, I can have a
function that returns a NetworkNode but I can assure the
compiler that it is in fact a SISNode and therefore call
the method getStatus() that only a SISNode has. Like
>>>SISnode s,t;
NetworkNod e n;
n =t;
n.getStatus( );//won't work
s= (SISNode) n;
s.getStatus( ); //will work

This is supposed to be Java, I suppose.
Yes, it was supposed to be Java
>
The exact equivalent in C++ would be:

SISnode* s ;
SISnode* t ;
NetworkNode* n ;
n = t ;
n->getStatus() ; // won't work
s = dynamic_cast< SISnode* >( n ) ;
s->getStatus() ; // will work./
>>No it won't.
Thanks a lot for that! I will consider what Alf Steinbach wrote above on
how to do it with a boost::shared_p tr, but in any case this is exactly
what I was trying to do. The word "dynamic_ca st" is actually the key, it
is really hard to google something when you don't know its name ;)
I think his example is supposed to be Java. Otherwise, it won't
compile.
>>>...
...
>>>I'm now looking for some way to do this in C++. I do
agent-based network simulations, and I want to derive all
kinds of agents from a generic network node type. This
network node is supposed to store his neighbours in a
std::list<Ge nericNetworkNod elist. Now in the derived
classes I can obtain the neighbours, but I cannot call
their methods unless they were already declared in the
GenericNetwo rkNode declaration.
>>>Anybody knows how to solve this problem? A hint in the
right direction (keyword) would be more than enough....

The two important points to remember are that C++ has value
semantics by default, you have to explicitly use pointers or
references to get reference semantics, and that the equivalent
to Java's cast operator in C++ is dynamic_cast.
>>This is not possible, with what you wrote above and the assumed
declaration s. You must realise that when you run n=t; you lose all
the information specific to a SISNode. There is no way to build it
back.

If they above were C++, he'd not loose any type information.
But he'd get a new object (with a new type), which is probably
not what he wants.
Yup. Actually this was a problem I encountered before when I had an
object a, created a new object b, said b=a, manipulated b and was
stunned that a was still the same.... I'm sorry, I think the question
was probably not really well asked, I tried to keep it concise.
>>That's why I consider that C++ objects should always be
allocated dynamically and referend thru a pointer.

That's valid for entity objects, but not for value objects.
>>If you had written:
>>class SISNode:public NetworkNode {...};
>>SISNode* s=new SISNode();
NetworkNode * n=s;
>>then you could write:
>>SISNode* nAsSISNode=dyna mic_cast<SISNod e*>n;
if(nAsSISNode !=0){ nAsSISNode->getStatus(); }
>And, assuming that NetworkNode is derived from
GenericNetwork Node you can then use
std::list<Gene ricNetworkNode* to store them. Though it might
be worth to follow Alf's advice and use some kind of smart
pointer (which would make it
std::list<Smar tPointerType<Ge nericNetworkNod e).

If these are entity objects, as it would seem, I don't know of a
smart pointer that would really be appropriate.
Ayah. Smart pointer, entity objects, value objects - enough for today to
read on. Thanks a lot, everyone!
--
James Kanze (GABI Software) email:ja******* **@gmail.com
Conseils en informatique orientée objet/
Beratung in objektorientier ter Datenverarbeitu ng
9 place Sémard, 78210 St.-Cyr-l'École, France, +33 (0)1 30 23 00 34
Aug 15 '08 #5
On 15 Aug, 09:16, Oliver Graeser <grae...@phy.cu hk.edu.hkwrote:
>Oliver Graeser <grae...@phy.cu hk.edu.hkwrites :
I'm coming from Java to C++ and this is one of the very
last problems I have so far... In Java, if I have, say, a
class SISNode that extends NetworkNode, I can have a
function that returns a NetworkNode but I can assure the
compiler that it is in fact a SISNode and therefore call
the method getStatus() that only a SISNode has. Like
>>SISnode s,t;
NetworkNode n;
n =t;
n.getStatus() ;//won't work
s= (SISNode) n;
s.getStatus() ; //will work
This is supposed to be Java, I suppose.

Yes, it was supposed to be Java
The exact equivalent in C++ would be:
* * SISnode* s ;
* * SISnode* t ;
* * NetworkNode* n ;
* * n = t ;
* * n->getStatus() ; * // won't work
* * s = dynamic_cast< SISnode* >( n ) ;
* * s->getStatus() ; * // will work./
>No it won't.

Thanks a lot for that! I will consider what Alf Steinbach wrote above on
how to do it with a boost::shared_p tr, but in any case this is exactly
what I was trying to do. The word "dynamic_ca st" is actually the key, it
is really hard to google something when you don't know its name ;)
I'd just like to mention that if the dynamic type of *s happened to be
something else (not a SISnode), then this would not work. To ensure
that the cast succeeded, check the pointer against 0.

s = dynamic_cast<SI Snode*>(n);
if(!s)
{
// the cast failed, handle error...
}

or:

if( !(s = dynamic_cast<SI Snode*>(n)))
{
// handle error...
}

I prefer the former.

DP
Aug 15 '08 #6
Triple-DES wrote:
On 15 Aug, 09:16, Oliver Graeser <grae...@phy.cu hk.edu.hkwrote:
>>>>Oliver Graeser <grae...@phy.cu hk.edu.hkwrites :
>I'm coming from Java to C++ and this is one of the very
>last problems I have so far... In Java, if I have, say, a
>class SISNode that extends NetworkNode, I can have a
>function that returns a NetworkNode but I can assure the
>compiler that it is in fact a SISNode and therefore call
>the method getStatus() that only a SISNode has. Like
>SISnode s,t;
>NetworkNod e n;
>n =t;
>n.getStatu s();//won't work
>s= (SISNode) n;
>s.getStatu s(); //will work
This is supposed to be Java, I suppose.
Yes, it was supposed to be Java
>>The exact equivalent in C++ would be:
SISnode* s ;
SISnode* t ;
NetworkNode* n ;
n = t ;
n->getStatus() ; // won't work
s = dynamic_cast< SISnode* >( n ) ;
s->getStatus() ; // will work./
No it won't.
Thanks a lot for that! I will consider what Alf Steinbach wrote above on
how to do it with a boost::shared_p tr, but in any case this is exactly
what I was trying to do. The word "dynamic_ca st" is actually the key, it
is really hard to google something when you don't know its name ;)

I'd just like to mention that if the dynamic type of *s happened to be
something else (not a SISnode), then this would not work. To ensure
that the cast succeeded, check the pointer against 0.
Thanks for the hint. I'm actually not worried about having nodes with
the wrong type since every network only has one kind of node, I'm going
through this ordeal only because I want to keep all reporting methods in
the same network class.

I used you hint though to work out another problem. I originally stored
all my nodes in an array, such as

GenericNetworkN ode * nodeList;//declaration
......

nodeList = new SISNetworkNode[size];//network constructor
......
SISNetworkNode *snn;
snn=dynamic_cas t <SISNetworkNode *(&nodeList[i]);//here comes the disaster

I managed to find out that it is something about the array, i.e. if I
instead use an array of pointers, create a node for each pointer, and
then do the dynamic cast for nodeList[i] instead of &nodeList[i], it
works. Is there any particular reason why dynamic casts doesn't work
with arrays?

>
s = dynamic_cast<SI Snode*>(n);
if(!s)
{
// the cast failed, handle error...
}

or:

if( !(s = dynamic_cast<SI Snode*>(n)))
{
// handle error...
}

I prefer the former.

DP
Aug 18 '08 #7
On 18 Aug, 04:02, Oliver Graeser <grae...@phy.cu hk.edu.hkwrote:
I used you hint though to work out another problem. I originally stored
all my nodes in an array, such as

GenericNetworkN ode * nodeList;//declaration
.....

nodeList = new SISNetworkNode[size];//network constructor
.....
SISNetworkNode *snn;
snn=dynamic_cas t <SISNetworkNode *(&nodeList[i]);//here comes the disaster

I managed to find out that it is something about the array, i.e. if I
instead use an array of pointers, create a node for each pointer, and
then do the dynamic cast for nodeList[i] instead of &nodeList[i], it
works. Is there any particular reason why dynamic casts doesn't work
with arrays?
Yes. When you assign an array of SISNetworkNode to a
GenericNetworkN ode*, the array decays to a pointer to the first
element. This pointer is then converted to a GenericNetworkN ode*. The
fact that this pointer actually points to an array of SISNetworkNode
is "lost" to the compiler.

When you later write nodeList[i], the compiler will compute the memory
location as if you had an array of GenericNetworkN ode, not
SISNetworkNode. Since SISNetworkNode is almost surely larger than
GenericNetworkN ode you will end up referencing some random memory
location within the array.

As you have already figured out, arrays of pointers solves the
problem. But it would be even better to use std::vector instead and
avoid arrays.

DP
Aug 18 '08 #8
HL
On Aug 18, 10:02*am, Oliver Graeser <grae...@phy.cu hk.edu.hkwrote:
Triple-DES wrote:
On 15 Aug, 09:16, Oliver Graeser <grae...@phy.cu hk.edu.hkwrote:
>>>Oliver Graeser <grae...@phy.cu hk.edu.hkwrites :
I'm coming from Java to C++ and this is one of the very
last problems I have so far... In Java, if I have, say, a
class SISNode that extends NetworkNode, I can have a
function that returns a NetworkNode but I can assure the
compiler that it is in fact a SISNode and therefore call
the method getStatus() that only a SISNode has. Like
SISnode s,t;
NetworkNo de n;
n =t;
n.getStatus ();//won't work
s= (SISNode) n;
s.getStatus (); //will work
This is supposed to be Java, I suppose.
Yes, it was supposed to be Java
>The exact equivalent in C++ would be:
* * SISnode* s ;
* * SISnode* t ;
* * NetworkNode* n ;
* * n = t ;
* * n->getStatus() ; * // won't work
* * s = dynamic_cast< SISnode* >( n ) ;
* * s->getStatus() ; * // will work./
No it won't.
Thanks a lot for that! I will consider what Alf Steinbach wrote above on
how to do it with a boost::shared_p tr, but in any case this is exactly
what I was trying to do. The word "dynamic_ca st" is actually the key, it
is really hard to google something when you don't know its name ;)
I'd just like to mention that if the dynamic type of *s happened to be
something else (not a SISnode), then this would not work. To ensure
that the cast succeeded, check the pointer against 0.

Thanks for the hint. I'm actually not worried about having nodes with
the wrong type since every network only has one kind of node, I'm going
through this ordeal only because I want to keep all reporting methods in
the same network class.

I used you hint though to work out another problem. I originally stored
all my nodes in an array, such as

GenericNetworkN ode * nodeList;//declaration
.....

nodeList = new SISNetworkNode[size];//network constructor
.....
SISNetworkNode *snn;
snn=dynamic_cas t <SISNetworkNode *(&nodeList[i]);//here comes the disaster

I managed to find out that it is something about the array, i.e. if I
instead use an array of pointers, create a node for each pointer, and
then do the dynamic cast for nodeList[i] instead of &nodeList[i], it
works. Is there any particular reason why dynamic casts doesn't work
with arrays?


s = dynamic_cast<SI Snode*>(n);
if(!s)
{
* // the cast failed, handle error...
}
or:
if( !(s = dynamic_cast<SI Snode*>(n)))
{
* // handle error...
}
I prefer the former.
DP- Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -
Oliver, your question is exactly about polymorphism.
polymorphism in C++ is implemented with Pointers and References. You
can't expect polymorphic behavior on objects.
And, since they SisNode and NetworkNode are in the same class
hierarchy, static_cast is supposed to use instead of dynamic_cast. The
latter is usually used in multi-inheritence casting a base to its
sibling. But it's so possible to be fail that Triple-DEC mentioned to
check the result of casting.
Aug 18 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
3307
by: Ahmad Noori | last post by:
I have a form and in the form, I have a drop down box. Based on what the user selects, i want to display different input boxes. Here is my drop down box: <td> <select name="reptype" onchange="checkVersion4()"> <option value=""></option> <option value="A">A:</option> <option value="B">B:</option> <option value="C">C:</option>
17
7257
by: Torbjørn Pettersen | last post by:
I've got a table where I want some of the cells to use a background image. The cells have variable height, so I am using an image with a rather small height to fill up the background of the cells, thus making I look like one high image in there. When validating it, I get this error: there is no attribute "BACKGROUND" The validators also tell me there are no "HEIGHT" or
18
8056
by: Leslaw Bieniasz | last post by:
Cracow, 28.10.2004 Hello, I have a program that intensively allocates and deletes lots of relatively small objects, using "new" operator. The objects themselves are composed of smaller objects, again allocated using "new". From my tests I deduce that a considerable part of the computational time is spent on the memory allocation, which makes the program substantially slower compared to the equivalent code written using
4
5162
by: yf | last post by:
A KB article "http://support.microsoft.com/default.aspx?scid=kb;en-us;209599" tells that the maximum number of records that a table may hold if the PRIMARY key data type is set to AUTONUMBER is 4,294,967,295. Suppose the PRIMARY key data type is set to "RANDOM" AutoNumber. Suppose an application (a) successfully INSERTS "X" records, then (b) successfully DELETES "Y" records (X >= Y), then
188
17319
by: infobahn | last post by:
printf("%p\n", (void *)0); /* UB, or not? Please explain your answer. */
6
1817
by: s99999999s2003 | last post by:
hi i come from a non OO environment. now i am learning about classes. can i ask, in JAva, there are things like interface. eg public interface someinterface { public somemethod (); .... ... } In python , how to implement interface like the above? is it just
21
5699
by: T.A. | last post by:
I understand why it is not safe to inherit from STL containers, but I have found (in SGI STL documentation) that for example bidirectional_iterator class can be used to create your own iterator classes by inheriting from it, ie. class my_bidirectional_iterator : public bidirectional_iterator<double> { ... };
41
3052
by: Stuart Golodetz | last post by:
Hi all, Just wondering whether there's any reason why exception specifications are enforced at runtime, rather than at compile-time like in Java? (This was prompted by reading an article on GOTW, incidentally.) Is there something about C++ that makes it harder/impossible to check at compile-time? Cheers, Stu
33
2582
by: phfle1 | last post by:
Hi, I want to display the cursor as an hourglass on the click of a button in the form and use the following line to achieve that Me.btnRecherche.Attributes.Add("onclick", "document.body.style.cursor = 'wait'; ") Sadly, it doesn't work. One strange thing is that when I write the following: Me.btnRecherche.Attributes.Add("onclick", "document.body.style.cursor = 'wait'; alert(""ASASSAS"");")
0
8386
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8814
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
8592
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8661
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7419
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6213
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5684
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4211
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2800
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.