|
Mostly it's pretty easy, there are online translators that do a pretty good job:
http://www.developerfusion.com/tools/convert/vb-to-csharp/[^]
And
http://converter.telerik.com/[^]
for example. But you will need to check the code yourself fairly carefully - translated code isn't always the best way to do things, there may be better ways in the target language. There is no substitute for knowing both languages and careful reading!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Hai
When I upload zip file to Developerfussion state that is Inprogress for such a long time its seems like doesn't output;
|
|
|
|
|
It has "patches" like that - it can run slow or seem to "forget you completely" - it may be that it's very busy, or it may be poor coding. You can't expect too much from a free site, after all.
That's why I provided two links: one of them works if the other doesn't!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
It's working
WrightSfiso
|
|
|
|
|
|
Hai
I'm trying developer fussion I zipped my project but its state that "Iprogress" for such a long time;
|
|
|
|
|
Then send individual files, not inside a ZIP.
You're other option is to convert it by hand and teach yourself something in the process.
|
|
|
|
|
Hi,
How to create Time tracking applciation using c# Windows application? Which means I want to get How many hours work per applciation. For example automatically find the hours for app.
Please anybody knows tell me.
|
|
|
|
|
This is not a good question - we cannot work out from that little what you are trying to do.
Remember that we can't see your screen, access your HDD, or read your mind.
You need to explain in much better detail what you want to do, what you have tried, where you are stuck, and what help you need.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
|
Please Guys, provide some Link For E-mail Marketing Software
|
|
|
|
|
Suggestion: don't bother. You might get one "piece of rubbish" through, but then I'll tell Outlook you are a "junk site" and everything else will go straight in the bin. The one piece of junk I did see will be ignored as well. And a heck of a lot of people do the same.
So spending serious time and / or money on marketing software probably isn't going to get you a good return...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Ok, Dear Friend
I am Able to spend money and Time . But what place is right to spend money and time . who vender is good and faith full for me .....please suggest me
|
|
|
|
|
And what does that have to do with C#?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Why not ask these people?[^]
=========================================================
I'm an optoholic - my glass is always half full of vodka.
=========================================================
|
|
|
|
|
From my c# code I need to pass a custom object as input parameter to my Stored Procedure in oracle. In this custom object one of the attribute is an array of custom object. So, How can pass this to Stored Procedure using ODP.Net. My code as shown below:
[OracleObjectMappingAttribute("NAME")]
public virtual string Name{get;set;}
[OracleObjectMappingAttribute("ADDRESS")]
public virtual string Address{get;set;}
[OracleArrayMapping]
public virtual decimal[] Age { get; set; }
<pre> public virtual void FromCustomObject(OracleConnection objCon, IntPtr objUdt)
{
OracleUdt.SetValue(objCon, objUdt, "NAME", this.Name);
OracleUdt.SetValue(objCon, objUdt, "ADDRESS", this.Address);
OracleUdt.SetValue(objCon, objUdt, "AGE", this.Age);
}</pre>
public virtual void ToCustomObject(OracleConnection objCon, IntPtr objUdt)
{
this.Name = ((string)(OracleUdt.GetValue(objCon, objUdt, "NAME")));
this.Address = ((string)(OracleUdt.GetValue(objCon, objUdt, "ADDRESS")));
this.Age = ((decimal[])(OracleUdt.GetValue(objCon, objUdt, "AGE")));
}
[OracleCustomTypeMappingAttribute("SERVICE_VATPADMIN.PERSON_TYPE")]
public class PersonBOFactory : IOracleCustomTypeFactory
{
public virtual IOracleCustomType CreateObject()
{
PersonBO obj = new PersonBO();
return obj;
}
}
private void btnSaveData_Click(object sender, EventArgs e)
{
decimal[] ageArray = { 1, 2, 3 };
PersonBO objPersonBO = new PersonBO();
objPersonBO.Address = "Delhi";
objPersonBO.Age = ageArray;
objPersonBO.Name = "Mrs.Jhon";
OracleConnection objCon = new OracleConnection("Data Source=VATPD;User Id=SERVICE_VATPADMIN;Password=serV1ce_adkong0n;Persist Security Info=true;");
objCon.Open();
OracleCommand cmd = new OracleCommand("InsertPerson_Proc", objCon);
cmd.CommandType = CommandType.StoredProcedure;
OracleParameter objParam = new OracleParameter();
objParam.OracleDbType = OracleDbType.Object;
objParam.Direction = ParameterDirection.Input;
objParam.UdtTypeName = "PERSON_TYPE";
objParam.Value = objPersonBO;
cmd.Parameters.Add(objParam);
cmd.ExecuteNonQuery();
}
This code is working fine if AGE is not an array.
But, how to handle this if AGE is an array.
Can anyone help me on this.
|
|
|
|
|
Hi,
I have been searching for several hours about how to get a list of all drive letters in use. All of the code examples I have tried were able to list all drive letters in use but did not include mapped network drives.
I have tried DriveInfo, Directory.GetLogicalDrives and attempted to use WMI through the ManagementObjectSearcher. Win32_DiskDrive and Win32_LogicalDisk lists all drives except mapped network drives. If I use Win32_NetworkConnection or Win32_MappedLogicalDrive using Scriptomatic, only the network drive is listed but when those WMI classes are in my C# code, nothing seems to happen with my application. No output is ever produced.
There is some conversation around the Win32 API but 100+ lines of code seems a bit overkill to map a single drive unless that is the only way it can be done.
A few others mentioned not to use 'NET USE' so I have avoided that in favor of using a native C# code. I want to follow C# best practices as closely as possible.
Ultimately I would like to use the next available drive letter to map to a network share but I need some way to be certain that the next available drive letter is not in use by a network share that the methods I have been using cannot see. I haven't found any complete code in one place (or even across many places) that can accomplish this.
Thanks,
Rob
|
|
|
|
|
Um.
string[] drives = Environment.GetLogicalDrives();
foreach (string drive in drives)
{
Console.WriteLine(drive);
}
For me that prints:
A:\
B:\
C:\
D:\
E:\
F:\
G:\
M:\
P:\
S:\
V:\
X:\
Z:\ Where C: is my primary HDD Partition; D: is my secondary; E:, F:, and G: are my DVD drive in various forms; Z: is a USB drive; and all the rest are network shares.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Environment.GetLogicalDrives is not collecting my network drive as far as I can tell. The only output I am getting are all physical drives. My output is:
C:\
D:\
E:\
F:\
G:\
H:\
I:\
K:\
There should be an X:\ drive listed for my my network drive. I don't have a clue why it works for you but the same snippet works differently for me. I'll try inspecting the array during debug to see if it was collected but is not getting output for some reason.
UPDATE: I checked the 'drives' array during debug and my X:\ is not a member.
-Rob
|
|
|
|
|
Is the drive connected and readable? What does Windows Explorer say?
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I can see that drive X:\ is available in File Explorer (Win 8.1) and I can access it without any issues. As I mentioned in my first post, Win32_NetworkConnect and Win32_MappedLogicalDrive give me the mapped network drives in vbscript but I can't seem to get these WMI Classes to work with the C# ManagementObjectSearcher.
I'm leaning towards using Environment.GetLogicalDrives, get the last drive letter used and then use Try-Catch to map the next drive letter. If the mapping fails because it's a network drive, I'm not sure where to go from there.
|
|
|
|
|
|
Friend I do a project in C#.I am new to C#.I need to know about:
1)How to plot the real time data that come every second from com port into the Graph
2)Running on the low priority thread,that logs data into table for that day in DB(MySQL) should store one day data
next day clean the old data and store current Data only.I am unable to rectify that Problem.Please give me solution for that.
Thank you for Reading
|
|
|
|
|
This is a broad concept and might require me to forward you to some other resources to learn more on these facilities. For example, the first thing is creating charts is itself a broad thing to do and mostly you might require a third-party library to create charts in your C# application. You forgot to mention which framework you're going to use, WPF or Win Forms etc.
You can however, try to do a little Google for this chart library and Google would yield a lot of friendly results for you to use any of those libraries. Try out this Google search[^] (chart C#).
Once that has been done the other thing that you've said about constantly updating the chart requires you to run a function (for creating the chart) after every instance of time (which in your case, might be a function call, a time interval like 1 second, or any other condition or event) to let your chart get updated every time there is a new data. It totally depends on your application and how you implement this updating-the-UI-feature. An example of such might be using the Timer class, to run your application after a time interval. But what I would like to advise here would be to run your application, each time a new data is saved in the database. Create a function like StoreData() and then inside this function, run other function to update the chart. This would save you time, and would cause the application to update its UI only when a new data is added.
If you want to delete the data from MySQL database, you can simply pass the command of DELETE to the data source (server) and it would delete all of the data. Otherwise, if you're going to delete the data from the thread only, then you can try to create a new instance of that thread every day and so on.
The sh*t I complain about
It's like there ain't a cloud in the sky and it's raining out - Eminem
~! Firewall !~
|
|
|
|
|
Too much for a quick answer, but we can give you some first steps. Try that and come back with more specific problems when needed.
First of all, if you're a beginner you're probably in over your head, if you have a senior developer to ask questions to, do that.
Secondly, you'll need to divide your problem into smaller problems. for instance you could separate your data to graph problem by creating a module that reads the com port and just saves the data to database. A second problem would then be to read the data from database and put into a graph. A third, again separate module would check which data should be removed and removes it.
Make sure to use a layered and modular approach. Take in account risks (what happens if data could not be read from com port, or removed the next day? What happens if one of the modules falls out, ...).
With that in mind, steer away from any IDE you're using and start opening up documents to create a good design:
- what are the object definitions and how are they moved around both in database as in code?
- what are the possible modules and what are there tasks?
- Who can use which part of the system?
- What technologies will you use for the graph system (some prototyping will need to be done)
- Try to imagine how the system would grow.
- What exceptions or problems could arise?
- ...
good luck.
|
|
|
|