|
In new projects i have been used C#, but my boss ask me Why C# ?
If the FrameWork is the same, why i used the C# ?
" I used because this language is better than VB.NET in OOP."
Is this correct? I don´t remember where i read this information.
Are there any Documents , Articles .... about : VB.NET x C# ?
Wich language is the best ?
thanks for help
|
|
|
|
|
You deleted your post from Lounge withing few minutes and posted it here. Smart move.
You can find your answer in C# Frequently Asked Questions blog[^] by c# team.
//Start of joke
Never comment ur code. If it was hard to write, it should be hard to understand !!!
//End of joke
|
|
|
|
|
Sorry, the Lounge is not for coding questions.
Thanks for help
|
|
|
|
|
Search the comments. Recently there was a discussion about that issue.
|
|
|
|
|
Like Stefan said, there was a similar discussion about 2 weeks back[^]
Luis Ricardo wrote:
In new projects i have been used C#, but my boss ask me Why C# ?
What would indicate to your boss that you should pick something else. If you know C# better than VB.NET then why not?
Luis Ricardo wrote:
" I used because this language is better than VB.NET in OOP."
Well, they have similar features, just a different syntax. C# does take more advantage of features of the CLR so it is probably just ahead.
Luis Ricardo wrote:
Wich language is the best ?
That question is very loaded, there are two camps and people on each will defend their position as to why their choice is better. However, IMO, it is all really what you know best.
"You can have everything in life you want if you will just help enough other people get what they want." --Zig Ziglar
The Second EuroCPian Event will be in Brussels on the 4th of September
|
|
|
|
|
Thanks. I will read the similar discussion.
|
|
|
|
|
|
Syntactically, Visual Basic .NET and Visual C# .NET are two different languages, just as Visual Basic, Visual C, and Visual C++ are different languages. Visual C# .NET looks more familiar to Visual C, Visual C++, and Java programmers, and Visual Basic .NET looks more familiar to Visual Basic developers. The biggest differences between the languages fall into the following categories:
Case sensitivity
dentifier names in Visual Basic .NET are not case-sensitive, but identifier names in Visual C# .NET are case sensitive.
Variable declaration and assignment
Variables in Visual Basic .NET are declared with the variable before the data type. In Visual C# .NET, the data type precedes the variables.
Data types
Integer in Visual Basic .NET is int in Visual C# .NET. However, System.Int32, the .NET Framework base type for which Integer and int are aliases, can be used in both languages. Visual C# .NET also supports the signed byte, unsigned short, unsigned int, and unsigned long data types, which are not available in Visual Basic .NET.
Statement termination
Statements in Visual Basic .NET are terminated by the end of the line. You can use the colon ( to put multiple statements in a line, and you can use the line continuation (_) character to make a statement span several lines.
Statements in Visual C# .NET are terminated by the semicolon (;). You can use multiple statements per line, and statements can span multiple lines.
Statement blocks
Visual Basic .NET does not use arbitrary statement blocks. Instead, certain keywords that have a specialized terminating statement are used instead of the statement blocks.
In Visual C# .NET, braces ({}) are used to delimit a statement block; otherwise, a single statement is assumed.
Use of () vs. []
Visual Basic .NET uses parentheses () to delimit array elements, function arguments, and property indexes.
Visual C# .NET uses parentheses () to delimit function arguments, and brackets ([]) to delimit array elements and property indexes.
Error handling
Visual Basic .NET supports both structured and unstructured error handling, but Visual C# .NET supports only structured error handling.
Overflow checking
Visual Basic .NET has a project level setting to check for overflow. However, the checking can only be turned on and off at the project level, instead of at the level of an expression or a block of code. Visual C# .NET statements can run in either a checked or an unchecked context. In a checked context, arithmetic overflow raises an exception error. In an unchecked context, arithmetic overflow is ignored and the result is truncated. This can be used on an expression or a block of code.
Late binding
Both Visual Basic .NET and Visual C# .NET can implement implicit late binding through reflection. However, implementing late binding in Visual Basic .NET is much easier than in Visual C# .NET.
Handling unmanaged code
Visual C# .NET permits you to write unmanaged code. In unmanaged code, you can do things such as declare and operate on pointers, perform conversions between pointers and integral types, and take the address of variables. In a sense, writing unmanaged code is much like writing Visual C code in a Visual C# .NET program.
n Visual Basic .NET, you cannot write unmanaged code.
Sreejith S S Nair
|
|
|
|
|
I need to change the secuirty settings of an IIS Virtual dir programatically. I have to disable annonymous login and leave only integrated secuirty enabled. Does anyone know how can I do this ?
I tried the DirectoryServices ("IIS://") stuff but is giving me an COM error.
Mauricio Ritter - Brazil
Sonorking now: 100.13560 MRitter
English is not my native language so, if you find any spelling erros in my posts, please let me know.
|
|
|
|
|
How many times to do I have to say this: if you're getting an error, tell us what it is? How do you expect us to help you?
Using directory services is the preferred way, and in most cases the only way.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
Hi,
I have a datagrid . I filled the grid with values and now I want to keep check boxes beside every column header in the datagrid. I want check boxes only in each column header cell. How do I do this?
Karteek.
|
|
|
|
|
You laready asked this about 24 hours ago. Be patient, or learn to research solutions yourself. It's very rude.
In any case, like I said in my previous post[^], the DataGrid in the .NET 1.x FCL does not support this, nor does it make it easy to implement. Either use a third-party control (of which I listed a couple in my previous post) or wait till .NET 2.0 where the GridView will be introduced with a lot more customization possible.
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I've created a very, very simple custom CodeAccessPermission class. It basically does nothing more than override the necessary base class methods and implement IUnrestrictedPermission.
In another class, I want to perform an imperative security check to ensure the caller has been granted my custom permission:
<br />
public static void ReadData()<br />
{<br />
CustomPermission MyPermission = <br />
new CustomPermission(PermissionState.Unrestricted);<br />
MyPermission.Demand();<br />
<br />
}<br />
The problem is, I haven't done anything to specifically grant my application this permission, and when I call Demand no SecurityException is thrown. But, I want a SecurityException to be thrown since I have not explicitly granted any code that permission.
Why does this happen?
- Mike
-------------------------
"No human being would stack books like that." - Dr. Venkman
|
|
|
|
|
You've hopefully already read this, but be sure you're familiar with the content described in Creating Your Own Code Access Permissions[^] in the .NET Framework SDK. Also be sure that your permission class is installed into the GAC and granted FullTrust permissions, as is documented (and for reasons that should be obvious).
If your application is granted FullTrust permissions, than it really doesn't matter what permissions you demand - they will all succeed.
Also, make sure that any callers higher in the stack haven't asserted that permissions (if they have it, they can grant it for children).
Microsoft MVP, Visual C#
My Articles
|
|
|
|
|
I overlooked the subtle fact that all code on the local computer gets Full Trust by default. That's all.
- Mike
-------------------------
"No human being would stack books like that." - Dr. Venkman
|
|
|
|
|
i can get the video stream but i can't transfrer the another computer in the Lan,or internet.
|
|
|
|
|
You have to setup a video server on your host machine. You can get the Windows Media Encoder to be the server or you can start here[^] if you wanted to reinvent the wheel and write one yourself.
RageInTheMachine9532
|
|
|
|
|
I am looking into this myself. I want to have a streaming server with multiple clients running on the same box as the server. Have you found any help or examples on this?
Regards,
Eric C. Tomlinson
I won't dignify your question with an answer. Yes, I program in VB6, but only because I'm addicted to eating!
|
|
|
|
|
I want to transfer images from client to server,till now i used TCPListener and TCPClient classes in C#.means i use simple socket programming,but i read some where that tapi uses H.323 protocol which is faster for transfering video/audio streams or any other streams. My question is that can H.323 protocol be used for transferring images from client to server.give me any sort of help
mughalali
|
|
|
|
|
See the post I submitted down on your other thread.
The TAPI 3.1 docs start here[^] on MSDN. You'll have to P/Invoke a BUNCH of functions and translate structures from C++ into C# in order to use them.
RageInTheMachine9532
|
|
|
|
|
How can i get the baseline of a font object?
eg: (imagine this is a lower case g :P)
<br />
----------------- (text top is about here (top of capital letters) <br />
<br />
<br />
********<br />
** **<br />
** **<br />
** **<br />
******* -------- (baseline is here) <br />
**<br />
**<br />
****** --------- (textbottom is here)<br />
is it even possible to get this from a gdi+ font?
i need it for my 100% managed gdi+ html renderer engine.
http://www.compona.com/xhtmlrender10.gif[^]
//Roger
|
|
|
|
|
look at Font.EmHeight in points, Font.GetAscent in points, Font.GetDescent in points, Font.Height in pixels
The best way to convert it, it to Font.GetHeight()*(Font.GetAscent/Font.EmHeight) given a top left as the 0,0.
top secret xacc-ide 0.0.1
|
|
|
|
|
I use MSComm control in a C# applications. Most time the program works well. But the only problem is that, at a certain position in the transporting sequence, the server terminal has returned reply, but the OnComm event doesn't execute immediattely. It will execute in several seconds. That seems the MSComm control doesn't work at the point for several seconds.
Anybody meet similar problem?
Can you help me?
vigorous
|
|
|
|
|
u must use the CEOL command which allocates the COM's with the Demands.
Ok
|
|
|
|
|
Anonymous:
What's meaning of CEOL command? I don't understand it, could you please explain it further?
Thanks
vigorous
|
|
|
|