C++-->C# : You can use WIN32 GlobalAlloc and then use the handle in a C# app (thanks to PInvoke or the like).
C#-->C++. You can also use .NET AllocHGlobal and then pass the IntPtr (it's a pointer) down to C++ code (thanks to PInvoke or the like).
She's so dirty, she threw a boomerang and it wouldn't even come back.
When writing code in Visual Studio .NET the notational code dropdowns have tooltips next to them.
How do you write classes which produces this behaviour?
I think it's somthing to do with metadata, but not sure what or where...
You are correct. Under "Coding Techniques" for Visual Studio, I found the following:
If developing in C#, use the XML Documentation feature.
I suspect that only C# supports this feature because Microsoft pushed C# to be a standard, which it now is (supported by an outside standard committee not related to Microsoft--I can't remember the name). Another reason to code in C# and not VB (oops, biased statement!)
Now is a static property of the DateTime class. When getting the property, a DateTime instance is created for you, so no need to do it again. Tip: think of as just another construtor (like many other static methods that also returns an instance of a class) with a meaningful name. Now, that sound a lot better than just DateTime() , but it adds meaning to the object.
Hope this helps
Before you criticize a man, walk a mile in his shoes. That way, when you do criticize him, you'll be a mile away and have his shoes.
You need to use sockets library to initiate a tcp/ip connection over port 25 and supply the necessary SMTP commands to send an email. This requires an SMTP server though.
It shouldn't be hard to code a simple email sending application but if you would like to use features like mime emails, attachments etc, you'll need an emailing component like devMail.Net- http://www.devmail.net[^]
I am desperate for help! This is really eating my breakfast, lunch and dinner!
I have a class I have derived from the native ListView class. I have a context menu that I show when the user right clicks on a selected item in the list. When they select the "Delete" option in the context menu, I do a ListView.RemoveAt(index) where index is the index of the item they selected. The remove at works, but when the method returns control to the operating system, I get an unhandled exception with the following exception text.
************** Exception Text **************
System.ArgumentOutOfRangeException: Specified argument was out of the range of valid values.
Parameter name: '0' is not a valid value for 'displayIndex'.
at System.Windows.Forms.ListViewItemCollection.get_Item(Int32 displayIndex)
at System.Windows.Forms.ListView.LvnBeginDrag(MouseButtons buttons, NMLISTVIEW nmlv)
at System.Windows.Forms.ListView.WmReflectNotify(Message& m)
at System.Windows.Forms.ListView.WndProc(Message& m)
at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
I can find no place in the remainder of my code where I am trying to attempt to access an item from the listview. Can anyone help decipher what my problem is?
Principal IT Analyst