|
I dont know if there is any option -t but there is a command line option /t that specifies the type of target assembly i.e. whether its exe,dll or module.
Wasif Ehsan.
|
|
|
|
|
|
maybe Stack and Heap have something to do with the answer
|
|
|
|
|
I don't think the question is so much about *recognizing* them. It recognizes them because value types are all C# reserved keywords. If it finds one where it expects an object l-value, it knows it's a value type.
Are you trying to figure out what the difference is between the two?
This isn't the right place for this question. It's a .NET question, not a C# question. Then again, if you're asking this board to answer your interview question, you probably don't know the difference between the CLR and C#. Good luck keeping the job if you get it.
|
|
|
|
|
hello all,
in my .NET 2.0 WinForm. I want to add Name, Value in Combobox. but There is no ListItem in .NET 2.0.
How to do this
regards
GV Ramana
|
|
|
|
|
Ramana. G.V wrote: There is no ListItem in .NET 2.0
Why do you think that?
---
b { font-weight: normal; }
|
|
|
|
|
Try using DisplayMember and ValueMember properties of the ComboBox with a ArrayList .
public class Person
{
public Person(string name, int age)
{
this.name = name;
this.age = age;
}
public string Name
{
get { return name; }
}
public int Age
{
get { return Age; }
}
private string name;
private int age;
}
ArrayList people = new ArrayList();
people.Add(new Person("Nick", 26));
people.Add(new Person("Bob", 20));
this.comboBox1.DisplayMember = "Name";
this.comboBox1.ValueMember = "Age";
this.comboBox1.DataSource = people;
|
|
|
|
|
Without having a thread continually checking Screen.PrimaryScreen.Bounds.Size and comparing it against the previous value, is there any way to detect a change in screen resolution.
|
|
|
|
|
|
That event fires somewhere between 1 and 4s before Screen.PrimaryScreen.WorkingArea.Height does on my screen though, which makes it rather poorly suitable to use as a trigger for redrawing of the form.
|
|
|
|
|
Office Lineman's answer is the official answer, and likely the best you're going to get.
It's not surprising that it fires before other downstream messages get processed, like the ones that actually change the resolution. It's an event-driven OS, so if you go ahead and repaint your form as soon as you get it: 1) your UI thread may not get traction on the processor before the resolution is actually changed, and 2) even if your form does repaint before the screen changes, the screen resolution will necessarily eventually change to match what you've repainted. Once the message is in the queue, it's going to happen unless there's a nasty leech sitting on your queue eating those messages (which there shouldn't be). If you're still listening for more resolution changes, and someone changes it again, it'll just get queued behind the other change, and you'll process them in order. By the time the user's done fiddling, you'll still be repainted to the right resolution.
Changing screen resolutions in Windows isn't nearly as pretty as many other events that you can listen for. This is because they really don't expect it to happen all that often. I don't envy you for having to write an application that deals with cranky events like this.
|
|
|
|
|
Stephan Samuel wrote: Changing screen resolutions in Windows isn't nearly as pretty as many other events that you can listen for. This is because they really don't expect it to happen all that often. I don't envy you for having to write an application that deals with cranky events like this.
Frotunately for me it's a very low priority item. It came up after connecting a laptop to a projector forced a resolution drop and truncated the bottom of the dialog. I can do a good enough fix by handling the OnResize event, even if it's sub optimal since the only other time the event fires is after the layout mangler had add/removed a component. I was hoping there was a better way, although the number of apps I've seen get messed up by resolution changes didn't make me optimistic about it.
|
|
|
|
|
Hi.
List some sites where can i get sample c# projects.
Thanks in advance
|
|
|
|
|
I'm sorry, is your i.q. = -53?
There are thousands of them here.
|
|
|
|
|
In codeproject.com where can i find
|
|
|
|
|
|
If u want to give exact information,then give,not do like this.
|
|
|
|
|
Actually the way Paul reacted wasn't much off of what most people would. Codeproject is not a site ment for people coming and telling what they need and just getting it point blankly. It is ment to give a nudge and let you solve the problem on your own.
GOOGLE is your friend. Use it!
|
|
|
|
|
HI everyone,
I'm new to C#. I'm having problems in connecting to a remote machine that is not part of my network but our company can connect remotely to the machine. I was wondering, how can i code my web app in retrieving the datasource for that machine? Someone told me to use messaging for the 2 machines to communicate to one another. I'm not sure how this is really done. Also we are using a product call Citrix to remotely connect to the other server.
I greatly appreciate this.
sopheap
|
|
|
|
|
This is probably not the right board for this question.
What do you mean by "your network"? Do you mean that it's not on your subnet, or that there is no physical connection between the two? Likely, you mean the first (subnet), because it's rare in this day that your computer isn't connected to the Internet.
Can you connect to the remote machine by Citrix? Try the Remote Desktop application to connect to the machine (it does exactly the same thing as some versions of Citrix). If you can connect, there's a physical route, and all you should need to do is ensure an open port, correct credentials and the right connection information.
If you can't connect (i.e. -- ping, traceroute, telnet, etc.) from your machine to the server by Citrix, you're either not physically connected (rare), or some network hardware between where you are and the destination is not bridging/switching/routing your packets. Talk to your network people.
|
|
|
|
|
Thanks Stephan,
But I'm working on a C# web application. I can not remotely connect to the server I need to access only by login into Citrix will allow me access. My application calls the database that Citrix has access to by giving the datasource, userid and pw to oracle. I know how to to call my development database but the production has to go through Citrix. If I can tnsping my datasource, i wouldn't really care but since I can't and the only way to connect to the production is through citrix.
Sopheap
|
|
|
|
|
Sopheap,
If I understand what you're saying, and it's all true, it means that there's a firewall between development and production. This is normal, especially if you work in finance or health care. If you can RDP from your desktop to production with Citrix, there's obviously a connection, but your Oracle access is blocked. I don't know what protocol or ports Oracle uses, but I'm sure that's easy enough to find.
It sounds like you have 3 options:
1. Get the network people to open your ports. If they set up a firewall, they may not want to do that.
2. Tunnel through RDP. I haven't looked at the protocol, but based on what it's transporting, it's gotta have a huge payload. Stuff your Oracle access packets into the payload space. You'll need a tunnel endpoint application running on the production server for this to work.
3. Run your application on the server.
Option 1 is really the only good one. If someone blocked your access to the Oracle server in production, it's probably for a good reason. If you can't convince them that your application is worthwhile a hole in their firewall, they probably won't take kindly to any other means you use to access their data.
|
|
|
|
|
Thanks again for your response Stephan.
well in order for me to access production with citrix, i have to login to a webpage to get access to the citrix portal. once i click it, it opens a connection to a desktop. once i'm on that desktop, i can remote desktop to my production database.
lets say my production web server has my .net application and using the ip address for the production database for the datasource. If my web server is connected to citrix which has access to my production database remotely, will my application work?
Someone told me, that I would have to write a program using msgbuff.dll to dispatch the listener. I'm not sure how that would work. I'm new to this Citrix enviroment. I never heard of it until here. Everything we support here is all at a secure remote location.
Thanks for your help. I greatly appreciate.
|
|
|
|
|
Yikes! There's no easy solution to this.
It sounds like msgbuff.dll is essentially your RDP tunnel endpoint. I've never used Citrix to this extent; you need a real Citrix expert for this.
From what I understand of Citrix and RDP, here's what happens:
When you go to that page and login to something, a component on that page spawns a local RDP client after authentication. You get the remote window, and the RDP connection ferries your mouse moves over and the resulting screen paints back. There's a lot of optimization and such to make it manageable.
The web server doesn't act as much other than an auth provider. It's unlikely that any connection to the web server is going to do you any good other than maybe authenticating your requests. A good API will have a nice .NET web service set up for this, so you should be able to mount a SOAP wrapper locally to authenticate. In any case, the web part of this is probably the least of your worries.
If my view of this is correct, this DLL (msgbuff) is esentially going to wrap all your requests, ferry them over some secure protocol (I'd be surprised if it wasn't RDP or a derivative thereof), and provide you with a listener hook for responses. Depending on how that's written, it'll make it easier or harder to mangle your Oracle packets to match the API. What you're going to end up with is an Oracle endpoint that looks like a database to your application, but really just slurps the incoming packets, ferries them over the secure tunnel, and pumps back anything it gets from its listener.
The good news is that it's not a horrible application to write. The bad news is that you're going to need to know both the msgbuff.dll API and the Oracle protocol pretty well in order to get it to work. If you have any competency in Win32 C (not MFC or ATL or anything), write yourself a good, small driver to do this. I'd assume that msgbuff.dll isn't a .NET DLL, and both marshalling data to that and packet rearranging are so much easier and neater in C than in any managed language I've ever seen. If you pull it off, your job security is nearly guaranteed.
I'd show this thread to the person who referred you to msgbuff.dll and ask them if it sounds reasonable. Short of that, find someone who knows Citrix.
|
|
|
|
|
http://msdn.microsoft.com/netframework/downloads/samples/bclsamples/[^]
I can't get these sample to compile... is this an issue with my install or are these guys just screwed up?
.............................
There's nothing like the sound of incoming rifle and mortar rounds to cure the blues. No matter how down you are, you take an active and immediate interest in life.
Fiat justitia, et ruat cælum
|
|
|
|