ivaka's Q&A profile
Game Technologies: DirectX, XNA, XACT, etc. Could C# be the future of gaming?
Since XNA is using C#, and is is a more intuitive language than C++, is it possible that in the future that C# will dominate, espessially in AAA titles. Could XNA be ushering a new way of programming in the main stream Hi Jeff, As some one who is a partner in a company (and lead developer) that produces enterprise high performance security applications, many of them in C#, I think you will be very surprised what you can do with C#. I develop in C++, C++/CLI (.net C++) and C#. C# is my favorite by far. While it certainly takes a lot of care and research to get the "barn burning" speed you can truly get out of C#. Once you know what to avoid and how to write performance critical apps in C#, you will only go back when you ...Show All
Visual C# CS1525: Invalid expression term 'char'
temp+=Replace(temp, char (13),"<br>"); temp+=Replace(temp , (char) (13),"<br>"); ...Show All
Visual Studio Express Editions Autocomplete Combobox
I'd like to mimic Access's autocomplete combobox with the NotInList event. User can start typing and if the text exists it will appear... if it does not and user hits enter, an error messagebox "does not exist" is shown. Please can someone help direct me to a solution in C# Thanks for checking. I'm running this off a databound (from access mdb) combobox. I shut everything down and rechecked my code but I'm still getting the same error. ...Show All
SQL Server How to format a text box to show bullets
I want to display this on a report Conditions of your reward · The enclosed reward has been couriered to you in accordance with the selection you made. · This reward cannot be returned in full or part for points, swapped or exchanged for cash. · If your product is defective in any way upon receipt, please contact to arrange a replacement. you would think it would be simple but I can't seem to get it to work. The best I can come up with is a bullet point then the text straight afterwards. I have also tried an image but when it prints it doens't really look the part. Any ideas if you are talking about static text (as opposed to ...Show All
Software Development for Windows Vista Communicating a WorkflowAuthorizationException result from a web service call
Hi I've already posted on this issue before but never got any answer that solved my problem. http://forums.microsoft.com/MSDN/ShowPost.aspx PostID=791955&SiteID=1 . Please have a look at this post to get some more background. My solution to getting an exception result back to the client is to allow the workflow to throw exceptions all the way up to the root of the workflow and terminate. The webservice activities will report this as a result of the call. I then, looking at another post, changed one of the SqlPersistenceService stored procedures slightly to not remove the instance from the InstanceState table for this type of termination of the workflow. Effectively throwing the in memory workflow instance away and maintaining ...Show All
Audio and Video Development XPath - intersection of nodesets
Is it possible to perform an intersection of nodesets within an XPath And if possible... Is there a somewhat elegant way to do it Seemingly it's not difficult with XPath 2.0, however with the HD spec we're using a subset of XPath 1.0. The most common reason anyone would want to do this -- since elements can have multiple classes, let's say we'd like to select all elements with class('a') AND class('b'). The class() function involves a built-in (which is probably optimized / indexed on DOM load) split() or tokenize() on the "class" attribute string, and it would be hard to mimic this ability looking at @class directly. I realized what the problem was -- this may (or may not) be instructive... I ha ...Show All
Visual C# deleting network drives
Is there a way to programmatically delete a network drive. I can get the network path and the drive name but can not seem to remove it. I can disconnect the the drive, but I need to be able to delete it from the system, so it no longer shows up in My Computer. This is how I'm getting the drive name and path: ManagementClass manager = new ManagementClass("Win32_LogicalDisk"); ManagementObjectCollection drives = manager.GetInstances(); foreach( ManagementObject drive in drives ) { if(drive["DriveType"].ToString() == "4") { System.Console.WriteLine( "Name=" + drive["Name"].ToString() + " Path=" + drive["ProviderName"].ToString()); } } Any idea how to delete ...Show All
Visual Studio Project Item Templates
Hi all, I'm developing a new project wizard which has to create both new projects and project items according to project and project item templates that we've created and tested. The problem I'm having is this: The new projects are being created correctly with the new template via (Solution2) GetProjectTemplate() but whenever I try to create the project item from its template via (Soluntion2) GetProjectItemTemplate() it throws the following exception: System.IO.FileNotFoundException Message: "The system cannot find the file specified. (Exception from HRESULT: 0x80070002)":null Source "EnvDTE80" string As I mentioned both templates have been tested and appear in the proper VS dialogs. It just seems tha ...Show All
.NET Development Webservice consumes all the available bandwidth.
We are on the test phase of a windows-webservice-Oracle application.Clients would connect the webservice through VPN or VSAT. VPN users would directly connect with the webserver,where VSAT user will connect with the VSAT server which will be routed to the webserver. Now the VPN users have an average bandwidth of 512 kbps and VSAT users have an average of bandwidth 360 kbps.There would be an average of 30 users at a time whom would connect either through VSAT or VPN. Now,if we connect through VSAT environment it runs out of bandwidth.The transacted data may reach upto 1 MB for each user. The web server memory is 2GB.We haven't implemented cl ...Show All
SharePoint Products and Technologies New Group
hi does anybody know how to create new group in sharepoint thru C# code... I tried something like web.Groups.Add(... but I dont know which parameters values to pass this function...I dont want the current logged in user to be the owner of the group. Thanks Manu ...Show All
SQL Server Restore error :msg 5173
Hi, I try to restore a backup copy of production database into development database, this is our routine process, which is scheduled every night, at the end of the restore process, development database is set to SIMPLE and log file is truncated. It works fine, but today the process failed because backup file is corrupted, so the database is in loading state, and I used the following restore command to restore database from another good copy of backup file: restore database devcopy from disk='c:\dev.BAK' with move 'dev_data' to 'G:\DBFiles\devCopy_Data.MDF', move 'dev_Log' to 'F:\DBFILES\devCopy_Log.LDF', replace I got an error messge: Server: Msg 5173, Level 16, State 1, Line 1 Cannot associate files with different databases. ...Show All
Visual Studio Team System What are the steps for Load testing using NUNIT testcases?
Hello, I have installed Team Suite and i am trying for Load Testing using NUNIT Test Cases that we have prepared. What are the steps for Load testing using NUNIT testcases Do we have Cool Down Time in Team Suite If 'YES' How to set it Thanks, Riti You could just convert your NUNIT cases to VSTS unit tests using the NUnit converter here: http://blogs.msdn.com/jamesnewkirk/archive/2005/06/24/432485.aspx and use those in your load test No - there is no explicit "cooling time" in load tests really, but I assume what you want to do in the cool time is reduce number of users accessing the system gradually, right ...Show All
Visual C# how to get total cpu usage
I need to be able to get a "total cpu usage" snapshot (system wide, not just for the process). anybody have a point in the right direction I see that the Process class has CpuTime usage, but returns a timespan object. If i'm to use that, how'd I convert a timespan into a % usage Steve, your best bet is probably to use the System.Diagnostics.PerformanceCounter class. In your case: using System.Diagnostics; ... public class MyClass { PerformanceCounter counter = null; public float CpuUsage { get { if (counter == null) { counter = new PerformanceCounter ("Processor", "% Processor Time", "_Total"); } return (counter.NextValue ()); } } ...Show All
Visual C++ Arrays of strings
Hi, need to write a simple C program (using Visual Studio 6)that will store multiple strings in an array. And also print them out using the scanf() and printf() functions Here is what i would roughly like it to look like: void main(void) { char array[1] [20]; scanf("%c", &array[0]); //I have a feeling that this line is wrong printf("\n%c", array[0]); //And this line } Thanks daniboy120 wrote: scanf("%c", &array[0]); //I have a feeling that this line is wrong Yes that is wrong int main(){ char arry[2][7] = { "hello" , " world" }; printf(arry[0]); printf(arry[1]); return 0; } Regards Sahir ...Show All
Visual Studio 2008 (Pre-release) Web Service Implementation
Hello, I am attempting to create an extremely basic "Hello World" web service using WCF. My service compiles fine and the wsdl is generated and I can browse to the wsdl via IE without any problems. I am now attempting to create a console application that calls this web service and simply display "Hello World" which is returned from the method. However, when my console application calls the service, it just hangs (providing I've set the Timeout to -1). Can someone please provide me with some direction I apologize if this is a dumb question. I just thought it was going to be quick and simple. Here is my code for the service: using System; using System.DirectoryServices; using System.ServiceModel; us ...Show All
