|
I am attempting to load some controls at runtime based on information from an XML file. However, I can't get the System.Type object created properly. Documentation alludes to the idea that the System.Type object can only represent simple/base data types. Does anyone out there know if this is correct or not?
Thanks
Dan Broomall
|
|
|
|
|
How are you getting the Type object. Some code might be helpful. There is a type for every class that you create.
If you are using Assembly.GetType(string) for exampe, make sure you use the fully qualified name for the type including namespaces.
My goal is to look at code like a chessmaster looks at a chessboard to see positions and possibilites beyond lines and characters.
|
|
|
|
|
if you have for example a type name string in a file for example
string typeName = "System.Security.Permissions.FileIOPermission";
you can do the following to get the type
Type permType = Type.GetType(typeName);
and then you can instanciate your type like so:
object permission = Activator.CreateInstance(permType);
|
|
|
|
|
What class is/are used to send and receive file( any files ) between client program and server program on TCP/IP?
Sample will be Good!
Thank you!
|
|
|
|
|
System.Net.Socket is a good place to start if you want to use TCP/IP.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
Can you give few line example? Thank you!
|
|
|
|
|
Anonymous wrote:
Can you give few line example?
It would be better if you got a book on the subject. C# Network Programming by Richard Blum[^] is quite a good book on the subject. (Although all the examples in the book are in C# it is really the .NET Framework that is the important part. So everything mentioned will work for C#, VB.NET, Fujitsu COBOL.NET or whatever).
You will probably find that there is a better way from the book. You haven't really mentioned what you are trying to do, other than sending a file via TCP/IP (which is a bit vague and doesn't take into account things like people having firewalls that block your connection. You may decide a better way is using a web service - which would send the file via HTTP and therefor pass through a firewall)
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
"On two occasions, I have been asked [by members of Parliament], 'Pray, Mr. Babbage, if you put into the machine wrong figures, will the right answers come out?' I am not able to rightly apprehend the kind of confusion of ideas that could provoke such a question."
--Charles Babbage (1791-1871)
|
|
|
|
|
|
You can send files to and from a share in your network if you only need to stay within an intranet. I've done this with system.IO.
Is this what you're refering to?
|
|
|
|
|
Hi To one and all
I am a web developer, now i have got an oppurtunity to grow in design part, but i have problem,
Since this is the first time i am working in design side , can anybody let me know the good approach, what is the best way to learn...
|
|
|
|
|
Hi,
I would like to know the Administrator Rights are there are not for the current user.
My application gives the computer name etc., when the user runs on his machine, at the same time I would like to know whether the user have Administrator rights or not.
Can any one help me.
Thanks,
Sreepathi
Sreepathi
|
|
|
|
|
<br />
using System.Security.Principal;<br />
using System.Threading;<br />
<br />
...<br />
...<br />
...<br />
<br />
WindowsPrincipal winId = (WindowsPrincipal)Thread.CurrentPrincipal;<br />
bool isAdmin = winId.IsInRole(WindowsBuiltInRole.Administrator);<br />
bool isPowerUser = winId.IsInRole(WindowsBuiltInRole.PowerUser);<br />
|
|
|
|
|
Hi Roman Rodov and all,
It doesn't work for me. Giving an error saying that the Specified cast is not valid.
Thanks,
Sreepathi.
Got it Thanks....
|
|
|
|
|
hi im despreately trying to find out how to send 'pulses' and 'waits' through the pocket pc (Ipaq 2210) infrared port. Im using C# and have researched all the technicalities of raw infrared but cannot figure out what kind of data to send.
I thought it was hexadecimal which represented the timings of the pulses and waits but these are in 2-byte forms and so eg 0015 0015 would have to be sent as 0x00 0x15 0x00 0x15 using WriteFile and this seems wrong.
Its a strange question but its urgent!
|
|
|
|
|
Hi,
I have DotNet remoting question and this is related to while development. I am working on C#/windows application. One of client (window form) need to access the method remotely (from remoting server)...Question:
When I am building the client while in development mode do I have to set reference explicitly to the DLL server (remotable object) because if I do that then when moving to production, I don't know in which folder remote server .DLL would be installed.
Favourite quote:
In youth we learn, In age we understand.
|
|
|
|
|
the reason you need a reference to the server dll is so that .net can know the interface of your dll.
so you can basicly copy your server dll to a local folder and reference it from there.
there is no need to reference it at the server at all.
//Roger
|
|
|
|
|
Hi
I want to start working with Managed DirectX,
aftre I install the SDK I have Microsoft.DirectX....xml file and not DLLs
to references.
Am I nead to compile any project?
How I get the DLLs ?
Thanks
Koby
|
|
|
|
|
I have just started trying my hand at DirectX. Have you installed the SDK Update from...
http://www.microsoft.com/downloads/details.aspx?FamilyId=9216652F-51E0-402E-B7B5-FEB68D00F298&displaylang=en
|
|
|
|
|
Hi all,
I want to develop an arabic Windows CE based application and I need your help .
* I don't have a pocket pc device and I am developping using visual studio 2003 .Net and .net compact framework in my work and using its pocket pc emulator.
SO, My question is :
- How can I load and use an arabic font and make the emulator understanding its arabic characters ?
Please help me as quickly as possible ...
Thanks for your time ...
Alaa El-Din Moustafa
|
|
|
|
|
I'm trying to determine how I can identify the accounts used to start specific services (if other than the system account assigned by default). I cannot find any information on returning this information. I would assume the natural place would be the ServiceController class, but it does not appear to be there.
Anyone have any ideas? Thanks for the help!
|
|
|
|
|
All you need is a bit of WMI
<br />
...<br />
using System.Management;<br />
using System.Management.Instrumentation;<br />
...<br />
...<br />
public void GetAllStartupAccounts()<br />
{<br />
ManagementClass serviceClass = new ManagementClass("Win32_Service");<br />
ManagementObjectCollection services = serviceClass.GetInstances();<br />
foreach(ManagementObject service in services)<br />
{<br />
Console.WriteLine("{0} starts under account: {1}", service["DisplayName"], service["StartName"]);<br />
}<br />
<br />
}<br />
|
|
|
|
|
I have a few pages that have controls with postbacks. Each time a postback is performed, a "flash" is generated which is very distracting on the eyes. How would you recommend I correct this? I had thought of doing a page transition fade effect for the controls but I am unsure of how to do this or if this is the right way to correct the flash.
Any suggestions?
|
|
|
|
|
I'm building a server based around Asynchronous sockets. Clients connect and are asked to authenticate, messages are exchanged using XML. As soon as the client has been authenticated the socket is associated with an object representing the person.
The server is working fine except when clients disconnect. If the client disconnects without sending a message to the server (i.e. the connection just drops) then the Socket seems to be closed before some of the server's clean up code can be called -- an ObjectDisposedException is thrown. I need a reference to the Socket since the clean up uses various parts of the type to correctly clean up.
Is there any way to ensure that my clean up code is performed before the Socket is disposed? The Dispose method is intended to be used for releasing resources, which isn't strictly the case and it would also require the derived Socket type to essentially be aware of where it's being used.
All suggestions are very much appreciated,
Paul
--
Paul
"Put the key of despair into the lock of apathy. Turn the knob of mediocrity slowly and open the gates of despondency - welcome to a day in the average office."
- David Brent, from "The Office"
MS Messenger: paul@oobaloo.co.uk
Download my PGP public key
|
|
|
|
|
How can I return the method that is called when an event is raised ?
System.Reflection.EventInfo.GetRaiseMethod does not work.
necati arslan
|
|
|
|
|
Are you looking for the method name? Or, a reference to the method?
Michael Flanakin
Web Log
|
|
|
|