|
|
Example[^] I gave a few weeks ago
DaveBTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)Expect everything to be hard and then enjoy the things that come easy. (code-frog)
|
|
|
|
|
is there any sample code show how to send audio file using rtp and c# or telling me the steps to do that
thanks in advance
|
|
|
|
|
The data sent is going to be the same in any language.
Sending arrays of bytes using a socket is easy. What bytes
to send is the "tricky" part - study the RTP specification!
Mark
Mark Salsbery
Microsoft MVP - Visual C++
|
|
|
|
|
Halo Frnds,
What is the difference between Instance and Object in C#
|
|
|
|
|
Instance refers to the copy of the object at a particular time whereas object refers to the memory address of the class.
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Class A
{
public void get()
{
Console.WriteLine("Hello");
}
}
Public Static Void Main(..)
{
A e=new A();/b>
e.get();
}
Here, A e=new A(); is instance or object
Can you expain a bit more
|
|
|
|
|
A is the object,
and e is the Instance,
through the instance you can access the method you have in the Class, you cannot access to the method without creating the instance...
spaps
|
|
|
|
|
Its an instance of an object
|
|
|
|
|
Hmmm... terminology is a bit blurry perhaps. Isn't object equivalent to instance? In school we learned that "An object is the result of instantiating a class". So if we have the class 'Dog', Spike and Lassie are objects of type 'Dog' or instances of the 'Dog' class. Just like objects in real life...
|
|
|
|
|
blackjack2150 wrote: Hmmm... terminology is a bit blurry perhaps. Isn't object equivalent to instance?
The terms class and instance are pretty clear. The term object on the other hand is trickier, as it's sometimes used to mean a class, sometimes used to mean any instance of a class, and sometimes used to mean a specific instance of a class.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
So wht's a differnce between Instance and Object ?????????????
A e=new A();
Here A is Object
and e is instance
Is it ryt as mentioned by one of the member above
|
|
|
|
|
.NET- India wrote: So wht's a differnce between Instance and Object ?????????????
A big difference and none at all.
It seems like your question mark key is stuck. Have you spilled too much cola in the keyboard?
.NET- India wrote: A e=new A();
Here A is Object
and e is instance
Is it ryt as mentioned by one of the member above
A is a class, and it can be called an object, but also an instance of the class A can be called an object.
The variable e is not at all an instance of the class, it's a reference variable that can hold a reference to an instance of the class A.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
.NET- India wrote: Here, A e=new A(); is instance or object
The term object is not very clear, as both the class A and an instance of the class A can be called an object.
e is a variable that can hold a reference to an instance of the class A (or any of it's decendants if there were any).
new A() creates an instance of the class A. The value of the expression is the reference to the created instance, which is stored in the variable e.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Actuallly sir in an interview i was asked this question "What is the difference between Instance and Object". So how should i define it??????
|
|
|
|
|
Just clarify that the term object is used for both classes and instances in different situations, and explain the relation between classes and instances.
Despite everything, the person most likely to be fooling you next is yourself.
|
|
|
|
|
Hi friends
I have two building configuration ( Debug & Release). Is possible to supply different exe names for each build. I am using Visual Studio 2005.
thanks in advance
-RisKhan-
|
|
|
|
|
No, you can not
Please remember to rate helpful or unhelpful answers, it lets us and people reading the forums know if our answers are any good.
|
|
|
|
|
Hello !
You can add a post build event:
for example rename and copy all your files with a bach script.
Project->Properties->Build events you can add a call to an exe
|
|
|
|
|
Or you could have two projects that build the same code.
|
|
|
|
|
Hi
I am trying to send an e - mail message. I have supplied the wrong network - credentials so that an exception would hopefully be thrown.
However, no exception is thrown. I find this very strange.
Heres my code:
mailMsg.Subject = m_Subject; // Subject of the E - mail.
mailMsg.Body = m_Content; // Content of the E - mail.
mailMsg.IsBodyHtml = true;
mailMsg.BodyEncoding = System.Text.Encoding.UTF8;
mailMsg.To.Add(m_Address); // The address to which the e - mail message must be sent.
mailMsg.DeliveryNotificationOptions = DeliveryNotificationOptions.Never;
System.Net.Mail.SmtpClient smtp = new System.Net.Mail.SmtpClient(serp_URL);
System.Net.NetworkCredential netCred = new System.Net.NetworkCredential();
netCred.UserName = serp_LoginName;
netCred.Password = serp_Password;
smtp.Credentials = netCred;
smtp.DeliveryMethod = System.Net.Mail.SmtpDeliveryMethod.Network;
try
{
smtp.Send(mailMsg);
}
catch (System.Net.Mail.SmtpFailedRecipientException)
{ // Or any other exception for that matter.
return false;
}
Any help would be greatly appreciated.
ChristiaanS
|
|
|
|
|
I have a similar problem, but I'm providing an invalid recipient address instead. I want an exception to be thrown, but none is. After attempting to send my message, I later got an email message from the SMTP server saying the mail was undeliverable (as expected). It seems that the SMTP server accepts the bad email and closes the connection with your program, so your program thinks everything is ok. Then, the SMTP server actually tries to deliver the mail. Does anyone know of a workaround so that your program knows whether or not the message was successfully delivered?
Thanks
|
|
|
|
|
Hi,
Can anybody tell how to change the value from database into some other language like Italian,French etc. i.e I want to make my site multilingual
|
|
|
|
|
i think maybe for the site you should use the resourses file (*.resx) and to properties set the Localizable to True,
and for the DB maybe you should redesign and add columns to the table for the extra language or you should think about other posibilites for ex. you set the languages in one table and add a column to table with the ID of the language that you are currently using. it can be done with the relationship tables..
hope it will help..
spaps
|
|
|
|
|
Hi! I´m trying to translate Vba call method from .dll. But if i translate it it won´t be the same in C#.
The code in VBA:
Public Sub SnodAnrop()
i = Module1.snod25x(host, port, user, pass, cert, cacert, service, arg, extra, result, buf)
End Sub
Declare Function snod25x Lib "sn25.dll" Alias "****" (ByVal Host As String, ByVal Port As String, ByVal User As String, ByVal Passwd As String, ByVal Cert As String, ByVal CAert As String, ByVal Nodtjanst As String, ByVal Arg As String, ByVal Extra As String, ByVal Result As String, ByVal Resultbuf As Long) As Long
The translation to C# have i done like this:
[DllImport("sn25.dll", EntryPoint = "****")]
static extern int snod(string host, string port, string user, string passwd, string cert, string CAert, string Nodtjänst, string arg, string extra, string result, int buf); private void button1_Click(object sender, EventArgs e) {
int i = snod("", "", user, pass, "", "", service, arg, "",result, 1024);
}
The problem is now is the string "result" in VBA returns info, but in C# it doesn´t collect any info at all. Int i returns a status value wich is 0 that meens OK. The problem is that i dont get any info back with the string "result" in C#
How Would u translate it? Have i missed something?
Im pretty new in C# so explain easely. Would Appriciate some help!!!
Thanks!!!!
|
|
|
|