|
You can create a solution with two projects. One project contains the C# code, and the other contains the VB.NET code. You can then reference the VB.NET in the C# project (right-click the project in the solution explorer and select Add References...)
You can now access your VB.NET code in the C# code. Remember to put using {Name Of Namespace}; if the VB.NET code is in a different namespace.
Does this help?
Do you want to know more?
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Thanx Buddy!
It works well but i just had a query in mind if we can some how embed the code in the same project.
|
|
|
|
|
Same solution: Yes, I am currently working on a solution with some parts written in VB.NET and some parts written in C#. They integrate very well.
Same project: No, you cannot mix code from different languages in the one visual studio project.
Do you want to know more?
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
Hi all,
I want to load a .Net Assembly in my Application, which is not located in the start folder of my App.
The Assembly-DLL I want to load is not shared and not registered in the GAC of the computer.
Does anybody knows a way how to load it!
I have heard ther is a way to add a search path for the assembly in the App.config file.
But I do not know thw respectin XML syntax.
Need Help
Thanks
Thomas
|
|
|
|
|
System.Reflection.Assembly a = System.Reflection.Assembly.LoadFile("myassembly.dll");
|
|
|
|
|
hi guys this is dipti from india well i am new to .net and making a project on it so any help from ur side will be appreciable.
dipti_garg@rediffmail.com
|
|
|
|
|
dipti17 wrote:
so any help from ur side will be appreciable
Is this an actual request for assistance? Or are you just forewarning us that you will be asking lots of questions in the near future?
Do you want to know more?
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
well watever u think but gud to see atleast any1 replied bye;)
|
|
|
|
|
|
hi guys this is dipti from india well i am new t .net and making a project on it so any hel
|
|
|
|
|
Deapti, Tell me what is your doubt and what you want to know ?.
Sreejith Nair
[ My Articles ]
|
|
|
|
|
I’m having trouble finding a clear answer to my question regarding visual inheritance and MDI children. I have made several dialog style forms/apps which were derived from a master template form (dll) – that works great, but I want to take it a step further. My next step was to create a MDI style application using visual inheritance for each child window. Just for information - I’m writing this in VS ver7 (C# base).
So, some questions:
1. Can I make a MDI application into which each child is a based on a master “template” form (dll). My hope is that each child would be its own DLL – easing future modifications and upgrades. Can this be done with .net’s virtual inheritance?
2. If this is possible, is there a way I can dynamically add new children DLL’s (which are visually derived from a master template form) to the MDI application without recompiling the base MDI application (that would be my dream)? Each new child would add new functionality to the core application – but maintain the same base “look”. Obviously this would take some coding, but is this possible?
If you have some ideas, experience, or know of any examples to either of my questions – please feel free to share your ideas.
|
|
|
|
|
You Wrote:
Can I make a MDI application into which each child is a based on a master “template” form (dll).
Sure you can make a common MDI for you child which is inherited from a common .dll.
You Wrote:
My hope is that each child would be its own DLL – easing future modifications and upgrades. Can this be done with .net’s virtual inheritance?
See once you created an inherited form. I mean child form you will get all the feature of your parent form. And this child form is entirly separate in nature with your parent. And you must care about one thing. See the modifiers of controls( members of your template).
You wrote
If this is possible, is there a way I can dynamically add new children DLL’s (which are visually derived from a master template form) to the MDI application without recompiling the base MDI application (that would be my dream)? Each new child would add new functionality to the core application – but maintain the same base “look”. Obviously this would take some coding, but is this possible?
See i don't know why you want to recompile the application. I mean the base. Are u going to make any updation after inheriting the form. Do you want to reflect it back to your child form ?
Sreejith Nair
[ My Articles ]
|
|
|
|
|
Hi,
Could Someone tell me with what version of the windows os is the .net framework already installed on??
gavirj
|
|
|
|
|
|
Thanks for the speedy responses - much appreciated.
What is IIRC??
So does Microsoft plan to include it in all their operating systems or will it always be a seperate distributable??
The reason Im asking is because I have an activex component that I would like to convert to .net but most of the people that would use it mostly only have 56k modems and to ask them to download a 20mb framework is a bit too much to ask.
gavirj
|
|
|
|
|
gavinJeffrey wrote:
What is IIRC??
If I Recall Correctly
gavinJeffrey wrote:
So does Microsoft plan to include it in all their operating systems or will it always be a seperate distributable??
Future versions of windows will include the .NET Framework. However if you will probably always need to supply a separate redistributable for people that are not using that OS, or if you are developing on a newer version of the framework. e.g. I would guess that if you were to develop something with .NET 2.0 for use on Windows Server 2003 you would still have to supply the 2.0 Framework (unless MS decide to include new versions of the framework in service packs)
Do you want to know more?
Not getting the response you want from a question asked in an online forum: How to Ask Questions the Smart Way!
|
|
|
|
|
|
Hi,
I have an assembly that I have run tlbexp.exe on, to create a Type
Library to be used by a COM Client. The type library contains two
interfaces and two coclasses.
The COM Client was already using a COM version (compiled from an IDL,
and stored with a DLL) of these interfaces and coclasses, with
specific GUIDs and ProgIDs. I have re-written the interfaces and
classes in C# so that the exported type library matches that of the
existing COM (except one part which i will come to later).
What I intend to do is to simply unregister the existing COM version
off the "COM machine", and register the Type Library created by
tlbexp.exe. I require the COM Client continue to run without having
to recompile, however, if needed, further building (using the newly
exported type library) would also be required.
Currently, i have got as far as allowing the COM client to run OK with
the new type library, however, when i try and build the COM Client, it
complains that it cannot load a DLL. I was of the opinion that this
may be something to do with the fact that the older COM version of the
interfaces and classes where contained in a DLL, and now that DLL is
no longer registered.
Also, a smaller point which concerned me. When the tlbexp.exe is run
on an assembly, all the enumerations values are prefixed with the
enumeration name and an underscore. Reading the MSDN documentation it
states that this is deliberate behaviour to ensure names are unique
(see http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpguide/html/cpcontlbexptypeconversion.asp).
So, i have two questions (finally!)
1. Are there any suggestions to why I am getting a "Unable to Load
DLL" error when trying to build the COM Client, and are there any
ideas of how to overcome this?
2. Is there any way to alter the behaviour of the tlbexp.exe to stop
it prefixing enumeration values?
Thanks,
Jamie.
|
|
|
|
|
Hi all,
i'm trying to write some Socket code in C#. I'm still learning all the intricacies of C#, and have come across something I'm not sure how to do. It may have been asked here before but I've failed to find any info on, so any help would be appreciated.
Socket.Send accepts a byte []. If I want to send an "int" which is the length of the bytes that I will be sending next, is there a conversion function from "int" to "byte []"?
The same goes for Socket.Receive. Is there a function that converts a "byte []" into an "int"?
Thanx
If there's one thing I've learned, it's that life is one crushing defeat after another until you just wish Flanders was dead. - Homer Simpson
|
|
|
|
|
you could try this -
byte[] myByteArray = (byte[])intValue;
Gavirj
|
|
|
|
|
Gavin,
that didn't work. I get the following error :
(136): Cannot convert type 'int' to 'byte[]'
Bute Nnamdi helped me, I needed to use the BitConverter class and it has a ToInt32 and GetBytes functions.
If there's one thing I've learned, it's that life is one crushing defeat after another until you just wish Flanders was dead. - Homer Simpson
|
|
|
|
|
The BitConverter class does what your looking for.
|
|
|
|
|
Int32 is a 32 bit integer.
32 / 8 = 4
therefore Int32 is 4 bytes long.
and the code you have there is correct for converting the byte array to an int, so im presuming you mean Int32 -> byte[]. for that, use:
int myInt = 5;<br />
byte[] bytes = BitConverter.GetBytes(myInt);
|
|
|
|
|
Hi Nnamdi,
just as I clicked send, I noticed the GetBytes function in BitConverter which I didn't see before, so I deleted my old message and was just about to write a thank you for your help.
<edit>
I think it's too early in the day. I can't believe I thought that a byte was 4-bits and not 8. I seriously need some sleep I think.
Thanx again
Jubjub
If there's one thing I've learned, it's that life is one crushing defeat after another until you just wish Flanders was dead. - Homer Simpson
|
|
|
|