468,256 Members | 1,451 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,256 developers. It's quick & easy.

ref

Hello;

I have 3 projects, project 1 + 2 are vb.net, project 3 in C#
project 3 : (C#)
public Class3(project2 x)

project 1
public sub ()
dim y as project2.class2()
dim x as project3.class3 = new project3.class3(y)
end sub

All I need to do is to send a referense of a third class between two
projects, one in c# and a second in VB.... this is not working well for me, I
heard I need to have som kind of ref function that returns a referens om my y
object and that I need to send the referens to class3..

Help, how can I don that
--
LZ
Jun 15 '06 #1
7 937
Lamis,

I am not sure what you mean with Send.

If you want to implement your C# class into your total project.
Than you can just add it as project and tell that it is a class libary in
the project properties of that and than do in your mainproject

Project -> add reference -> projects and click on the C# project that you
see.

Cor

"Lamis" <La***@discussions.microsoft.com> schreef in bericht
news:79**********************************@microsof t.com...
Hello;

I have 3 projects, project 1 + 2 are vb.net, project 3 in C#
project 3 : (C#)
public Class3(project2 x)

project 1
public sub ()
dim y as project2.class2()
dim x as project3.class3 = new project3.class3(y)
end sub

All I need to do is to send a referense of a third class between two
projects, one in c# and a second in VB.... this is not working well for
me, I
heard I need to have som kind of ref function that returns a referens om
my y
object and that I need to send the referens to class3..

Help, how can I don that
--
LZ

Jun 15 '06 #2
hi core,

I have already all the three projects in the same solution.. I need to pass
by a reference from a VB project to a C# project... the reference is an
object of a class in a VB third project.... this would work prefectly if all
three projects were written i C# or in VB... to pass an C# object to VB I
only need to type passobject(ref o) to make it work... I thought byref would
work, but it doesn't....
my theori is since I am typin passobject(o) in VB where passobject is a
method in a C# project, I need to send a reference to the object, not the
object it self...

I don't know if I just made it more confusing... I am very thankfull for the
help
--
LZ
"Cor Ligthert [MVP]" wrote:
Lamis,

I am not sure what you mean with Send.

If you want to implement your C# class into your total project.
Than you can just add it as project and tell that it is a class libary in
the project properties of that and than do in your mainproject

Project -> add reference -> projects and click on the C# project that you
see.

Cor

"Lamis" <La***@discussions.microsoft.com> schreef in bericht
news:79**********************************@microsof t.com...
Hello;

I have 3 projects, project 1 + 2 are vb.net, project 3 in C#
project 3 : (C#)
public Class3(project2 x)

project 1
public sub ()
dim y as project2.class2()
dim x as project3.class3 = new project3.class3(y)
end sub

All I need to do is to send a referense of a third class between two
projects, one in c# and a second in VB.... this is not working well for
me, I
heard I need to have som kind of ref function that returns a referens om
my y
object and that I need to send the referens to class3..

Help, how can I don that
--
LZ


Jun 15 '06 #3
In the Class3 constructor you have used the namespace project2 instead
of the class name project2.class2.

Lamis wrote:
Hello;

I have 3 projects, project 1 + 2 are vb.net, project 3 in C#
project 3 : (C#)
public Class3(project2 x)

project 1
public sub ()
dim y as project2.class2()
dim x as project3.class3 = new project3.class3(y)
end sub

All I need to do is to send a referense of a third class between two
projects, one in c# and a second in VB.... this is not working well for me, I
heard I need to have som kind of ref function that returns a referens om my y
object and that I need to send the referens to class3..

Help, how can I don that

Jun 15 '06 #4
Hej Göran

Jag har skrivit rätt i min kod.... felet som jag får upp är att det inte
finns konstruktor i project 3 som kan ta emot ett sådan argument.. Skapar jag
3 C# project så fungerar min kod utmärkt... Vill jag passera object från C#
till VB project så går det också bra, dock måste jag skriva ref i mitt
anrop... Så det måste vara något man ska göra för att få det fungera åt andra
hållet..

Någon tipsade mig om att jag ska skriva någon function som returnerar en
referense av objectet och det är referencen som skickas vidare till C#
projektet..

usch, man ska inte blanda flera språk i en solution, det blir bara soppa av
det hela
--
LZ
"Göran Andersson" wrote:
In the Class3 constructor you have used the namespace project2 instead
of the class name project2.class2.

Lamis wrote:
Hello;

I have 3 projects, project 1 + 2 are vb.net, project 3 in C#
project 3 : (C#)
public Class3(project2 x)

project 1
public sub ()
dim y as project2.class2()
dim x as project3.class3 = new project3.class3(y)
end sub

All I need to do is to send a referense of a third class between two
projects, one in c# and a second in VB.... this is not working well for me, I
heard I need to have som kind of ref function that returns a referens om my y
object and that I need to send the referens to class3..

Help, how can I don that

Jun 15 '06 #5
Lamis,

Het is geen probleem om in je moederstaal in deze nieuwsgroepen met anderen
te converseren, maar zet er dan wel a.u.b. een Engelse vertaling bij. Deze
nieuwsgroepen zijn bedoeld als community to learn from each other..

It is no problem to conversate with others in your native language in these
newstroups, but please place than a translation in English too. These
newsgroups are mean as community to learn from each other.

Cor

"Lamis" <La***@discussions.microsoft.com> schreef in bericht
news:08**********************************@microsof t.com...
Hej Gran

Jag har skrivit rtt i min kod.... felet som jag fr upp r att det inte
finns konstruktor i project 3 som kan ta emot ett sdan argument.. Skapar
jag
3 C# project s fungerar min kod utmrkt... Vill jag passera object frn
C#
till VB project s gr det ocks bra, dock mste jag skriva ref i mitt
anrop... S det mste vara ngot man ska gra fr att f det fungera t
andra
hllet..

Ngon tipsade mig om att jag ska skriva ngon function som returnerar en
referense av objectet och det r referencen som skickas vidare till C#
projektet..

usch, man ska inte blanda flera sprk i en solution, det blir bara soppa
av
det hela
--
LZ
"Gran Andersson" wrote:
In the Class3 constructor you have used the namespace project2 instead
of the class name project2.class2.

Lamis wrote:
> Hello;
>
> I have 3 projects, project 1 + 2 are vb.net, project 3 in C#
>
>
> project 3 : (C#)
> public Class3(project2 x)
>
> project 1
> public sub ()
> dim y as project2.class2()
> dim x as project3.class3 = new project3.class3(y)
> end sub
>
> All I need to do is to send a referense of a third class between two
> projects, one in c# and a second in VB.... this is not working well for
> me, I
> heard I need to have som kind of ref function that returns a referens
> om my y
> object and that I need to send the referens to class3..
>
> Help, how can I don that

Jun 16 '06 #6
Lamis,

It should not make any difference if the projects are in C#, VBNet, J# or
managed C+.

If the project is not CLI compliant than that will be told too you when you
add the reference to the project. (By instance as a *public* name is used
twice with as only difference the uper and lower case)

I hope this helps,

Cor

"Lamis" <La***@discussions.microsoft.com> schreef in bericht
news:AA**********************************@microsof t.com...
hi core,

I have already all the three projects in the same solution.. I need to
pass
by a reference from a VB project to a C# project... the reference is an
object of a class in a VB third project.... this would work prefectly if
all
three projects were written i C# or in VB... to pass an C# object to VB I
only need to type passobject(ref o) to make it work... I thought byref
would
work, but it doesn't....
my theori is since I am typin passobject(o) in VB where passobject is a
method in a C# project, I need to send a reference to the object, not the
object it self...

I don't know if I just made it more confusing... I am very thankfull for
the
help
--
LZ
"Cor Ligthert [MVP]" wrote:
Lamis,

I am not sure what you mean with Send.

If you want to implement your C# class into your total project.
Than you can just add it as project and tell that it is a class libary in
the project properties of that and than do in your mainproject

Project -> add reference -> projects and click on the C# project that you
see.

Cor

"Lamis" <La***@discussions.microsoft.com> schreef in bericht
news:79**********************************@microsof t.com...
> Hello;
>
> I have 3 projects, project 1 + 2 are vb.net, project 3 in C#
>
>
> project 3 : (C#)
> public Class3(project2 x)
>
> project 1
> public sub ()
> dim y as project2.class2()
> dim x as project3.class3 = new project3.class3(y)
> end sub
>
> All I need to do is to send a referense of a third class between two
> projects, one in c# and a second in VB.... this is not working well for
> me, I
> heard I need to have som kind of ref function that returns a referens
> om
> my y
> object and that I need to send the referens to class3..
>
> Help, how can I don that
> --
> LZ


Jun 16 '06 #7
Hi Cor
u r absolutly right, sorry
--
LZ
"Cor Ligthert [MVP]" wrote:
Lamis,

Het is geen probleem om in je moederstaal in deze nieuwsgroepen met anderen
te converseren, maar zet er dan wel a.u.b. een Engelse vertaling bij. Deze
nieuwsgroepen zijn bedoeld als community to learn from each other..

It is no problem to conversate with others in your native language in these
newstroups, but please place than a translation in English too. These
newsgroups are mean as community to learn from each other.

Cor

"Lamis" <La***@discussions.microsoft.com> schreef in bericht
news:08**********************************@microsof t.com...
Hej Göran

Jag har skrivit rätt i min kod.... felet som jag får upp är att det inte
finns konstruktor i project 3 som kan ta emot ett sådan argument.. Skapar
jag
3 C# project så fungerar min kod utmärkt... Vill jag passera object från
C#
till VB project så går det också bra, dock måste jag skriva ref i mitt
anrop... Så det måste vara något man ska göra för att få det fungera åt
andra
hållet..

Någon tipsade mig om att jag ska skriva någon function som returnerar en
referense av objectet och det är referencen som skickas vidare till C#
projektet..

usch, man ska inte blanda flera språk i en solution, det blir bara soppa
av
det hela
--
LZ
"Göran Andersson" wrote:
In the Class3 constructor you have used the namespace project2 instead
of the class name project2.class2.

Lamis wrote:
> Hello;
>
> I have 3 projects, project 1 + 2 are vb.net, project 3 in C#
>
>
> project 3 : (C#)
> public Class3(project2 x)
>
> project 1
> public sub ()
> dim y as project2.class2()
> dim x as project3.class3 = new project3.class3(y)
> end sub
>
> All I need to do is to send a referense of a third class between two
> projects, one in c# and a second in VB.... this is not working well for
> me, I
> heard I need to have som kind of ref function that returns a referens
> om my y
> object and that I need to send the referens to class3..
>
> Help, how can I don that


Jun 16 '06 #8

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by William C. White | last post: by
2 posts views Thread by Albert Ahtenberg | last post: by
3 posts views Thread by James | last post: by
reply views Thread by Ollivier Robert | last post: by
1 post views Thread by Richard Galli | last post: by
4 posts views Thread by Albert Ahtenberg | last post: by
1 post views Thread by inderjit S Gabrie | last post: by
2 posts views Thread by Jack | last post: by
3 posts views Thread by Sandwick | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.