|
I know for a fact that C# is more powerful and interfaces with all that the .NET framework offers, which VB .NET does not. If you're going to learn I new language, I would suggest C# since its used in industry extensively.
|
|
|
|
|
NewbieDude wrote: interfaces with all that the .NET framework offers
Really? That goes both ways.
For example, C# supports Unsafe code blocks, VB doesn't. VB supports optional parameters, C# doesn't.
It's just a matter of preference. They both target the .NET Framework quite well, each with it's own limitations.
I'd agree that learning C# would be very useful to him, but I'd also have to add that learning every language you can would be very useful to prospective employers even more so.
RageInTheMachine9532
"...a pungent, ghastly, stinky piece of cheese!" -- The Roaming Gnome
|
|
|
|
|
> C# is more powerful
Are you able to give some Examples?
> If you're going to learn I new language,
> I would suggest C# since its used in industry extensively.
Sometimes its not so easy ;o)
I see 2 possibilities:
a) convince my boss that c# is better
b) convince myself that vb is as good or even better.
Thats the reason for my vb vs. c# comparison research.
thx
Bernhard
|
|
|
|
|
There are no absolute, water-proof and one-sided reasons for choosing C# over VB. As VB uses the same framework, anything you can do in C# you can also do in VB. For an example, the untyped datatypes that you mention is a part of the framework, so of course they are also available in VB.
It's more a matter of taste. The difference is how you do things, not what you can do. For an example the event handing is easier in VB, if by easier you mean less typing. If you want to be able to read in the code what happens, the C# way is easier.
BASIC (Beginners All-purpose Symbolic Instruction Code) was a simple interpreted language in the beginning. Many attempts have been made to make it compiled and object oriented, and perhaps VB is one of the best, but my opinion is that the language still suffers from it's history. C# on the other hand is a language that is compiled and object oriented right from the start.
---
b { font-weight: normal; }
-- modified at 8:55 Monday 30th January, 2006
|
|
|
|
|
hi to all,
i'm working with a c# win form application and an sql server database.
i'm making a query that returns data with xml format.
i get the result of the query in an xmlReader c# object
how can i open the xml reader in internet explorer, in other word how can i put these date into internet explorer
best regards and thanks in advance
fady
|
|
|
|
|
"Flatten" the Xml to a physical disk file and then "point" IE to that file; if you have Xml file types bound to IE, then you can use a ShellExecute command on that Xml file and it should open in IE.
:..::. Douglas H. Troy ::..
Bad Astronomy |Development Blogging|Viksoe.dk's Site
-- modified at 11:36 Monday 30th January, 2006
|
|
|
|
|
Does anyone know of any known issues with Microsoft IE WebControls? We have
never used WebControls in our project and need to
know if any known security holes exist specific to IE WebControls.
|
|
|
|
|
Hi all,
I have just started working on SQL Server 2005
and am new to this so if anyone could guide me to
start with this.
Thanks
Pramod
|
|
|
|
|
|
|
Thanks for the link
Pramod
|
|
|
|
|
Hi Howzit,
I am used to VB .NET. When you type "private sub whatever" and press enter, it creates a nice little nice procedure, with an "end sub" and everything.
In C# when I type for e.g. "private static void whatever" and press enter, it does not automatically put in the braces, is this how C# works? I assumed it would put the braces in automatically? The same applies to typing for e.g. an "if (asdf=1)" statement and pressing enter, should it not put the braces in for me?
Maybe its a setting?
|
|
|
|
|
its all u have to do
sathy
|
|
|
|
|
It doesn't put the braces in for two reasons:
1. C# is not line based, as VB. A new line doesn't mean that the header declaration is complete.
2. In some cases the parenthesis after the parameters is not the last part of the declaration. It would be confusing if the editor would fource the braces in when there still is more things that you can put there.
Example: This is perfectly valid code in C# (if perhaps badly structured):
public
class
A
{
public
A
(
)
:
base
(
)
{
}
}
Notice the call to the base (object class) constructor call after the parameter paranthesis.
---
b { font-weight: normal; }
|
|
|
|
|
NewbieDude wrote: is this how C# works?
It is how the IDE works.
NewbieDude wrote: I assumed it would put the braces in automatically?
Is it really such a big deal to type two braces?
I tried Visual Assist, which does that sort of thing for you, but I got rid of it because it was just plain annoying.
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|
|
I don't mind typing braces in but I just had to ask! I am really starting to enjoy C# now, its quite an adjustment from VB6 & VB.net
|
|
|
|
|
SCNR: Thats because you are PROGRAMMING now and not SCRIPTING anymore...
Cheers,
Sebastian
--
Contra vim mortem non est medicamen in hortem.
|
|
|
|
|
|
In C# using excel.Application to output report.But when error happend, the excel can't close. I must write some coding for close excel.When Close excel,a save as dialog been showed.I want to not save the book,I want to close the excel only.How to do it? Can you give me a sample?
|
|
|
|
|
Perhaps if you undo actions back to the starting state, you can close Excel without getting the confirmation.
---
b { font-weight: normal; }
|
|
|
|
|
Hi,
u can do that by setting the variable of Excel.Workbook to true.
i.e. if u have an object of Excel.Workbook called WB
then just write WB.Saved = true; before closing the application or excel application.
Hope that works for u
Regards,
Pramod
|
|
|
|
|
I post the message in message boards, after this I try to use worksheet.saveas method that save to my driver, then close the worksheet.
app.Workbooks[1].SaveAs(@"c:\temp.xls", Missing.Value, Missing.Value,
Missing.Value,Missing.Value,Missing.Value,
Microsoft.Office.Interop.Excel.XlSaveAsAccessMode.xlNoChange,
Missing.Value,Missing.Value, Missing.Value, Missing.Value, Missing.Value);
app.Application.Workbooks.Close();
app.Application.Quit();
app.Quit();
System.Runtime.InteropServices.Marshal.ReleaseComObject (app);
the work sheet been closed, but the process still in task manager until my application been closed. Why?
so ,I more wrote code
Process[] procs = Process.GetProcessesByName("EXCEL");
foreach (Process proc in procs)
{
if (!proc.CloseMainWindow())
{
proc.Kill();
}
}
GC.Collect();
app = null;
At last, the excel porcess been disappeared in task manager.
|
|
|
|
|
Take a look at application.DisplayAlerts the .saved can be tricky, and there are situations where the excel doc will toggle it without you explicitly setting it. .Displayalerts suppresses ALL warnings from the excel document, but it definetely gets rid of the "do you want to save" issue.
|
|
|
|
|
Hi All,
I am having a problem with passing data from one form to another.
I have a Main Form, which everything is viewed in, however, sometimes a pop-up may be used for quick items (ie quick add a client).
I have been able to get data to pass forward (Ie parent to pop-up) and reverse (pop-up to parent - using the onclose event) however I cant use a onclose event for a pop-up that is from another pop-up.
For example:
Main Form --> Search Client (doesnt Exist) --> Add Client
I close the search form and need to pass the information in Add Client to the Main Form.
Any help would be appreciated.
Cheers All
|
|
|
|
|
bootn wrote: I have been able to get data to pass forward (Ie parent to pop-up) and reverse (pop-up to parent - using the onclose event) however I cant use a onclose event for a pop-up that is from another pop-up.
Then you need to pass to the popup of the popup the same information that the popup received from the Main Form. In other words, what information are you using in the popup to return the information back to the main form? (The answer to that will give you the information you need to do the same from the popup of a popup)
ColinMackay.net
"Man who stand on hill with mouth open will wait long time for roast duck to drop in." -- Confucius
"If a man empties his purse into his head, no man can take it away from him, for an investment in knowledge pays the best interest." -- Joseph E. O'Donnell
|
|
|
|