CFF KB - Carrz-Fox-Fire Promotions Knowledge Base
CFF KB is all about 1 thing: The Sharing of Knowledge and the Power we gain from it.Knowledge Base
- Breadrumbs:
CS0019: Operator 'operator' cannot be applied to operands of type 'string' and 'string'
- Article ID:
6252 - Date Created
Thursday, June 16, 2022 - This Article Has been Viewed
783 times - Short Desc
VB.NET and C# have different Operators when it comes to the & and the + symbols. Make sure you are using the correct one when programming the language you are working on. - Details
Writing code is different between the VB.NET and C# .NET languages. Therefore, when we port over codes, many things have to be considered when programming these two languages. - Recreate Issue
In VB.NET this code works, however, it does not work in C#.
Response.Write(getFile & "(Information goes here) Uploaded Successfully!<br />"); - Resolve Issue
To resolve this issue in C#, we need to change the Ampersand symbol of & to a plus +
Response.Write(getFile + "(Information goes here) Uploaded Successfully!<br />");
Share With Friends (Updated 6-8-2010)
Recent Articles
All Topics
- Coming Soon - Knowledge Exchange
Trending Articles
- Microsoft VBScript runtime error '800a0046' Permission denied FileSystemObject 24695
- Microsoft OLE DB Provider for SQL Server error '80040e57' String or binary data would be truncated. or The field is too small to accept the amount of data you attempted to add. Try inserting or pasting less data. 21297
- ADODB.Parameters error '800a0e7c' Parameter object is improperly defined 19544
- After Effects warning: Audio conforming failed for the following file .cfa. Perhaps due to disk space 17785
- The backup set holds a backup of a database other than the existing 16825