|
My.Computer.FileSystem.WriteAllText("C:\filename.txt", TextBox1.Text, True)
That is how I have done it! Thanks for the help Christian!
|
|
|
|
|
No problem. That's a shortcut for System.IO.File.WriteAllText, it does the same thing. My is a shortcut for VB only, not C#.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Dim SaveStream As System.IO.StreamWriter<br />
SaveStream = New System.IO.StreamWriter(directoryasstring.txt)<br />
SaveStream.Write(texttosaveasstring)<br />
SaveStream.Close()
Posted by The ANZAC
|
|
|
|
|
how to add reference to the aracle database.dll
in vb.net????
|
|
|
|
|
You've asked two questions
1 - to make a dll, create a class library project.
2 - to reference to a dll, right click on the references area of the solution explorer and choose 'add reference'
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
u mean addref--.net tab--oracle database.dll
but here i cannot fine oracle database.dll
can u tell me the exact path where it actually reside
|
|
|
|
|
Probably because you haven't installed something. You can find it here[^].
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
It's System.Data.OracleClient in the list of .NET references. You do not have to add anything that's part of Oracle ( and unless it's a .NET or COM dll, you couldn't any how )
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Hi,
Is it possible to specify that a sub/function argument should implement two or more interfaces?
What i mean is something like this (of course this doesnt work):
Private Sub DoSomething(ByVal x As {IFirst, ISecond})
'Do it
End Sub
Thx,
Banjobeni
|
|
|
|
|
No.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
If ISecond inherits IFirst then you could accept anything that Implements IFirst, which would also include anything that implements ISecond. However you would be limited to only the methods and properties found in IFirst. If you needed access to properties/methods found in ISecond you would have to test the object to see if it could be cast as ISecond and if so act accordingly. If those are completly seperate interfaces then no it's not possible.
|
|
|
|
|
What is the easiest way to test if an object can be cast as something?
|
|
|
|
|
if (myOb is IMyInterface)
{
}
or
IMyInterFace myInt = myOb as IMyInterface;
if (myInt != null)
{
// It worked
}
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
|
Sorry, I don't know the VB.NET syntax for 'is' and 'as'. I don't use VB.NET, ever.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
But you know that this is a VB.NET board, right? If I needed C# code or any of the .NET languages, i would have posted it there.
|
|
|
|
|
Did you know that both C# and VB.NET both target the .NET Common Language Runtime?
Did you also know that if you look on MSDN for the docs on any class, property, or method, or function, there's always an example in BOTH languages? Thousands of examples serving as Rosetta stones!
If TypeOf objectName Is interface Then
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Banjobeni wrote: But you know that this is a VB.NET board, right?
Yes, but I can answer most questions here, because they relate to the framework.
If Dave is on the job, I'll hang back, he always knows more VB than I do.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: If Dave is on the job, I'll hang back, he always knows more VB than I do.
I dont' know if that's flattering or not!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
Dave Kreskowiak wrote: I dont' know if that's flattering or not!
Given that I don't use VB at all, it's arguably faint praise, but it's not meant that way....
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
Christian Graus wrote: it's arguably faint praise,
Comming from you, that says a lot!
I know VB is kind of like a killer disease, but it's one I'm immune to! You actually CAN write good code with it, it's just rare to find a person who's been using it AND knows how to write code!
Dave Kreskowiak
Microsoft MVP - Visual Basic
|
|
|
|
|
how to make a dictionary using vb and any database mangaemnet
|
|
|
|
|
What do you mean - a dictionary as in a way to look up meanings of words ? I guess you can just make a table with two columns, word and definition.
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|
|
i want the codes for it in VB and in oracle.as backend and fron end..
|
|
|
|
|
I bet you do. However, in the real world, people tend to use these forums to ask questions when they need help, not when they want the project written for them. Well, that's not true. The people who do that, tend to get help, and those who say 'I need this code' tend to end up disappointed.
It's kind of trivial, why don't you try and ask when you get stuck ?
Christian Graus - Microsoft MVP - C++
Metal Musings - Rex and my new metal blog
"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )
|
|
|
|